cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
518
Views
3
Helpful
1
Replies

Re: Scheduling / automating APIC-EM backups

javerill
Level 1
Level 1

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

1 Reply 1

aradford
Cisco Employee
Cisco Employee

Hi Jason,

this is due to a PATH issue.

You can either update the PATH variable, or just be explicit with the specific with the specification of the "grape" command.

e.g.

/opt/cisco/grapevine/bin/grape