[EMAIL PROTECTED] wrote on 18/10/2006 10:16:14 AM: > I have a script to backup a VMWare virtual machine which when run manually > on the box by root runs OK, but when run by cron...well, it doesn't. > > This is the script .... > > echo VMSNAP Backup Script > echo _____________________________________________ > rm -f /vmimages/localbackup/###-###-REP1/* > rm -f /vmimages/localbackup/###-###-VDB1/* > echo Old images erased, new backup started > date > /usr/sbin/vmsnap_all > echo Backup complete, copy started > date > scp -r /vmimages/localbackup/* 192.168.0.1:/vmimages/from_vm1 > echo Copy complete, script exiting > date > > > > /var/log/messages shows > > Oct 15 16:30:05 RKI-SYD-VM1 sshd(pam_unix)[5470]: session opened for user > root by (uid=0) > Oct 15 16:30:05 RKI-SYD-VM1 sshd(pam_unix)[5470]: session closed for user > root
As far as I know, this states a session was successful via ssh (scp), perhaps there is nothing to place on the remote box? (eg, /usr/sbin/vmsnap_all didn't work) What is /usr/sbin/vmsnap_all, is it a shell script? Perhaps it relies on environment variables that are not set in the cron. After it is run from the cron, do the backups exist on the local machine's /vminages/localbackup? Cheers, Scott -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
