Hi, i need help with my dropbox integration. It was working fine until today when i got the following error in my mail:
Oops, your automated backup to Dropbox failed.
Error message:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 45, in take_backup_to_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py”, line 96, in backup_to_dropbox
backup = new_backup(ignore_files=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 169, in new_backup
delete_temp_backups(older_than = frappe.conf.keep_backups_for_hours or 24)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/backups.py”, line 186, in delete_temp_backups
os.remove(this_file_path)
OSError: [Errno 13] Permission denied: ‘./site1.local/private/backups/20170826_000213_a4515080_database.sql.gz’
Please contact your system manager for more information.
i’ve tried to find out what the cause of the error is but i can’t seem to figure it out. I would be glad if someone can advise me on how to resolve it.
@clarkej Thanks for the reply. I have console access and i’ve run the script. this is what i got:
Blockquote ubuntu@ip-172-31-24-66:/home/frappe/frappe-bench$ ls -al /home/frappe/frappe-bench/sites/site1.local/private/backups/
total 2228
drwxr-xr-x 2 frappe frappe 4096 Aug 26 23:02 .
drwxr-xr-x 4 frappe frappe 4096 Aug 25 14:52 …
-rw-r–r-- 1 frappe frappe 1133191 Aug 25 23:16 20170826_000213_a4515080_database.sql.gz
-rw-r–r-- 1 frappe frappe 1135064 Aug 26 23:02 20170827_000210_09f8deb7_database.sql.gz
Also, the backup files are listed in dark orange so that must indicate something right? (I’m a newbie to ERPNext and linux generally to be honest so i don’t know much).
I fixed the issue!!! I continued to research after my last reply and i realized that i needed to grant user ownership of the directory so i used this console command on the directory:
sudo chown -R ubuntu /home/frappe/frappe-bench/sites/site1.local/private/backups
I ran the take backup now command again from dropbox integration and backup was successful this time without the error!