I am having issues with backing up erpnext on S3. I have set up the backup using the UI Integration and received an email notification that the backup is successful but there are no objects in my s3 bucket.
Prior to this, I have received the following error messages while backup:
Oops, your automated backup to Amazon S3 failed.
Error message: Traceback (most recent call last): File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py”, line 83, in take_backups_s3 validate_file_size() File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/offsite_backup_utils.py”, line 105, in validate_file_size file_size = get_file_size(latest_file, unit=“GB”) File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/offsite_backup_utils.py”, line 75, in get_file_size file_size = os.path.getsize(file_path) File “/opt/bitnami/python/lib/python3.7/genericpath.py”, line 50, in getsize return os.stat(filename).st_size TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
@revant_one I did take a backup of all of the files you have suggested. Now, to test if I have done it correctly I was trying to restore the backup on a new instance using bench restore command.
But I am receiving an internal server error with the following error logs:
self.connect()
File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 599, in connect
self._request_authentication()
File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 861, in _request_authentication
auth_packet = self._read_packet()
File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 684, in _read_packet
packet.check_error()
File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user '_ac0d16c08c91ddf8'@'172.18.0.4' (using password: YES)")
Being a developer I can contribute to fix this issue. I just don’t know where to start. If you can point me to some resource or modules to look at it can give me a head start.