I've put together a bash script that creates the backup and then copies it via FTP to a different server. That works properly if it is manually run. But it doesn't work if it is initiated via the crontab.
Here is the script:
$ more ./daily_backup.sh
#!/bin/sh
HOST='10.255.0.100'
USER='anonymous'
PASSWD='network'
FILE='*.backup'
grape backup grow
sleep 10m
cd /srv/grapevine/replicated-storage/backups/*005056b40bcd/
ftp -in $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
cd APIC-EM/Backups/usspvlapic01
mput $FILE
quit
END_SCRIPT
exit 0
I think the problem is with the "grape backup grow" command. This doesn't appear to work from cron.
Am I doing something incorrect? (Please bear in mind that I know enough about Linux to be dangerous to myself and those around me!)
Any insights will be appreciated!
Thanks,
Jason