I am not even sure if this is an issue related to ERPNext, (which I guess, its not), and should it be raised here at all? But, I am raising this here as I think that probably someone might have tackled this issue, and might be able to give some insight and help.
I have created a backup.sh file on Scaleway server, where the default home directory is /root. When I run the backup.sh file manually, the backup is going through. But, when I am running it through crontab, like:
20 0 * * * cd /home/frappe/frappe-bench && /bin/bash /home/frappe/frappe-bench/backup.sh >> /home/frappe/frappe-bench/logs/aws-backup.log 2>&1
It is giving an issue of:
New S3 backup folder: 31082017_123717.
DB File: 20170831_123703_fda97bf0_database.sql.gz
Private Files: /home/frappe/frappe-bench/sites/site1.local/private/backups/20170831_123703_fda97bf0_private_files.tar
move failed: sites/site1.local/private/backups/20170831_123703_fda97bf0_database.sql.gz to s3://testserver-backups/test-bucket/31082017_123717/20170831_123703_fda97bf0_database.sql.gz [Errno 2] No such file or directory: ‘/home/frappe/frappe-bench/sites/site1.local/private/backups/20170831_123703_fda97bf0_database.sql.gz’
Any idea what could be the possible reason? Earlier, I was getting an “Unable to locate credentials” error, which I tried to resolve by putting the AWS_ACCESS_KEY_ID inside the script itself, and am no longer getting that error.
Any kind of suggestions or help will be appreciated. Thanks in advance.