SOLVED Wasabi Backup Error - KeyTooLong
Cloudron was backing up fine to Wasabi until 4 days ago, but it has been throwing up an error when attempting to upload a snapshot since then. This happens whether a manual backup is triggered, or it is run according to the backup schedule.
The region that this Cloudron instance (v.5.6.1) is being backed up to is Wasabi EU Central 1, and the storage format used is rsync.
The Error Message: Your key is too long HTTP Code: KeyTooLongError
I tried to change the API keys, but that didn't help. Manual created backups of individual app still seem to working fine. Any ideas on how to solve this?
@lucidfox It would be useful to know which app causes this error.
I heard this behavior before with nextcloud causing this error when there are too many sub folders and the string gets to long for the api/rsync to handle something like this.
I will look up the forum topic.
But this one is with tar and not rsync, hmmm.
Wasabi is using this https://git.cloudron.io/cloudron/box/-/blob/master/src/storage/s3.js to backup.
This should be an API issue with Wasabi.
KeyTooLongError, Your key is too long.
Do you use the backup encryption option? We have seen various issues with S3 like backup storage, where the filepaths simply are too long when encrypted and thus the storage backend failing.
You mentioned manual backups working, have you tried manual backups for all apps? Likely this is only occurring in one app.
Either way for now the only solution is to look at the failing backup logs and figure out which file is causing this, then see if it can be renamed. Alternatively the encryption can be turned off, if that is currently enabled, as this reduces the filepath length usually.
@BrutalBirdie thanks for the links, i'll check them out. nextcloud was actually the app that was most critical to backup, so i did a manual backup of that and it worked fine.
@nebulon we do have encryption turned on, i'll try to turn it off to see if that helps. an encrypted backup would of course be more desirable but perhaps another non-s3 storage option would work better for this.
thanks for the tips. i'll do manual backups and check the logs to figure out which app or file is causing the snag.
Update: It appears to be an instance of Syncthing with a particularly long filepath that is causing the backup issue.
@lucidfox rsync + encryption has file path length limitations i.e if your app has a file which has long path (not just the file name, maybe it is some 10 folders deep) the backup will error. The limitations are documented here https://docs.cloudron.io/backups/#encryption .
@Robin opened a feature request here to improve this - https://forum.cloudron.io/topic/3057/consider-improvements-to-the-backup-experience-to-support-long-filenames-directory-names
This post is deleted!