I have a Ubuntu 9.10 image running on Amazon EC2 and I've setup a backup script ec2-consisten-snapshot.
I'm able to run the script from SSH, and everything works peachy.
sudo ec2-consistent-snapshot --mysql --xfs-filesystem /vol vol-xxxxxxx >>/mnt/backup.log 2>&1
However when I schedule a cron job in sudo crontab -e, the script runs but gives me errors.
12 18 4 2 * ec2-consistent-snapshot --mysql --xfs-filesystem /vol vol-xxxxxxx >>/mnt/backup.log 2>&1
ec2-consistent-snapshot: ERROR: Can't find AWS access key or secret access key at /usr/bin/ec2-consistent-snapshot line 76. xfs_freeze: cannot unfreeze filesystem mounted at /vol: Invalid argument ec2-consistent-snapshot: ERROR: xfs_freeze -u /vol: failed(256)
The AWS access keys are located under $HOME/.awssecret and work fine if you don't run it from cron
Can someone point me what I need to do, I've been trying to figure this out for past week. Also how do I troubleshoot xfs_freeze that works fine from command line.
Thank you very much!