Scheduled backup question
How do i create a tar backup (using gzip compression) called /backup/boot_files.cron that will backup the /boot directory monday at 4pm ?
|
Hi,
you must add a line in /var/spool/cron/crontabs/root like this: 0 4 * 1 * /bin/tar czf /backup/boot_files.cron /boot then run crontab -e and quit it by :wq |
Quote:
0 16 * * 1 /bin/tar czf /backup/boot_files.cron /boot Correct me if I am wrong. |
Its always recommended to edit the cron file using the command
Code:
crontab -e NOTE: Chances are there may not be any file inside the cron directory if there are no cron jobs defined before. The crontab entry by tuxianD is correct. So, the steps would be: 1- crontab -e 2- Add the cron job (0 16 * * 1 /bin/tar czf /backup/boot_files.cron /boot) 3- Save and exit (:wq) |
Sure, 16 for 4pm :-)
I use my fovorite editor to edit cron files, then just update it with crontab -e, its the same. |
Is this home work?
|
All times are GMT -5. The time now is 11:53 PM. |