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