I'm using backup_fu to backup my database. In the crontab, you have this command:
* * * * * cd /var/www/amplify/current && RAILS_ENV=production /usr/bin/env rake backup
Yes, I know a backup a minute is intense, but I'm just doing it to test. I will change the interval once I get it working.
- However, running it in cron doesn't it backup. When I check my Amazon S3 account, I don't see a .tar.gz file.
- When I SSH in, and I paste the command exactly, it backs up and I see the .tar.gz in Amazon S3.
Note:
- I'm using RVM. However, as shown in this thread, if I cd into the directory, the proper ruby selection happens.
- I'm on CentOS:
Linux version 2.6.18-194.8.1.el5.028stab070.5 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Fri Sep 17 19:10:36 MSD 2010
- I checked
/var/log/cron
and it seems that it runs:Feb 27 00:20:01 amplify crond[1667]: (ramon) CMD (cd /var/www/amplify/current && RAILS_ENV=production /usr/bin/env /usr/bin/rake backup)
Any help is appreciated, thanks!