I'm trying to integrate automatic backup mechanism to Rails app and decided to use backup gem. Backup file is valid and runs successfully manually, but when i deployed it on VPS it didn't run by cron at all. Even log files were empty.
schedule.rb:
every :day, :at => '2:00 am' do
command "backup perform --trigger database_backup --config_file config/backup.rb --log-path log --tmp-path tmp",
:output => {:error => 'log/cron_backup_error.log', :standard => 'log/cron_backup.log'}
end
crontab -l
command results:
0 2 * * * /bin/bash -l -c 'backup perform --trigger database_backup --config_file config/backup.rb --log-path log --tmp-path tmp >> log/cron_backup.log 2>> log/cron_backup_error.log'
If i run any of these 2 commands on VPS manually it will work, but they doesn't work by cron. All other scheduled tasks run fine too.
Appreciate any help you can provide!