VMWARE croonjob

Sre 20 Nov, 2013 11:07

3. Now that the cronjob is ready to go, you need to ensure that this cronjob will persist through a reboot. You'll need to add the following two lines to /etc/rc.local (ensure that the cron entry matches what was defined above). In ESXi 5.1, you will need to edit /etc/rc.local.d/local.sh instead of /etc/rc.local as that is no longer valid.


/bin/kill $(cat /var/run/crond.pid)
/bin/echo "0 0 16 * * /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB.sh -f /vmfs/volumes/datastore1/ghettoVCB/vms_to_backup > /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB-backup-$(date +\%s).log" >> /var/spool/cron/crontabs/root
/bin/echo "0 21 20 2,4,6,8,10,12 * /vmfs/volumes/datastore1/ghettoVCB/./copy.sh" >> /var/spool/cron/crontabs/root
/bin/busybox crond


1. Setup the cronjob by appending the following line to /var/spool/cron/crontabs/root:

0 0 16 * * /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB.sh -f /vmfs/volumes/datastore1/ghettoVCB/vms_to_backup > /vmfs/volumes/datastore1/ghettoVCB/ghettoVCB-backup-$(date +\%s).log
0 21 20 2,4,6,8,10,12 * /vmfs/volumes/datastore1/ghettoVCB/./copy.sh

The Trackback URL for this entry is:

http://www.povej.net/forum/trackback.php?e=1042

Avtor Objave
There are no replies for this entry.
Pokaži sporočila: