/usr/sbin/portsnapInstead of:
portsnapFrom the root user type:
# crontab -eThis will bring up the schedule to be edited. The schedule follows the columns of minutes, hours, days, months and day of the week and is very customizable. FreeBSD allows the switches '@daily', '@weekly', etc, not all systems will allow those. All of the following examples are single lines.
For example, to schedule the download and update of the new ports tree on a FreeBSD system at 4:41am every day, add:
41 4 * * * /usr/sbin/portsnap -I cron &&/usr/sbin/portsnap updateIf you wanted to update the ports you set up with ezjail at 5:05am, add:
5 5 * * * /usr/local/bin/ezjail-admin update -PTo zip and archive your system config files at midnight add this on a single line:
@daily /usr/bin/tar zcvf /tank/backup/etc.tar.gz /etc&&/usr/bin/tar zcvf /tank/backup/usrlocaletc.tar.gz /usr/local/etcBack up your mysql database every night at 3:00am, add:
0 3 * * * /usr/local/bin/mysqldump -hlocalhost -uintranetguy -pd0ntTe3ll intranet > /var/sqlbackup/intranet.sqlAnd don't forget your weekly scrub for your ZFS array:
@weekly /sbin/zpool scrub tankJust like 'vi' you can Esc to command mode and exit with a ':' followed by 'wq' and Enter.
No comments:
Post a Comment