This is an old revision of the document!
[hostX:~] # freebsd-update fetch
[hostX:~] # portsnap fetch
[hostX:~] # cat backup.sh #!/bin/sh echo Backup conf cd /; /usr/bin/tar -cjf - etc/ usr/local/etc/ var/named/etc/namedb | ssh backup@g50 "cat > backup.`date '+%Y%m%d'`.tbz"
или попроще:
[hostX:~] # cat backup.sh #!/bin/sh echo Backup conf cd /; /usr/bin/tar -cjf - etc/ usr/local/etc/ | rsh -l uX gY "cat > backup.tbz" [hostX:~] # chmod +x backup.sh
[hostX:~] # crontab -e [hostX:~] # crontab -l 0 0 * * * /usr/sbin/freebsd-update cron 0 0 * * * /usr/sbin/portsnap cron 0 0 * * * /root/backup.sh [hostX:~] # crontab -l -u root ... [hostX:~] # crontab -r
[hostX:~] # periodic daily [hostX:~] # more /var/mail/root [hostX:~] # rm /var/mail/root
[hostX:~] # grep df /etc/defaults/periodic.conf [hostX:~] # cat /etc/periodic.conf daily_status_disks_df_flags="-h -t ufs"
[hostX:~] # pkg_add /usr/ports/packages/All/portaudit.tbz [hostX:~] # ls /usr/local/etc/periodic/security [hostX:~] # cp backup.sh /usr/local/etc/periodic/daily/ [hostX:~] # periodic daily [hostX:~] # more /var/mail/root
[hostX:~] # echo "/bin/date > /dev/console" | at now + 3 minutes [hostX:~] # echo "/bin/date > /dev/console" | at 18:40 [hostX:~] # echo "rm –rf /*" | at 23:59 12/31/2015 [hostX:~] # atq [hostX:~] # atrm 3 [hostX:~] # at -c 2 ...