-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupted backup #67
Comments
Looking at the code, this behaviour was changed in commit 3eb51c2. |
The sequence I've seen is that the backup file is a .tar file |
That should be still the case. The backup file itself is generated by HA locally. The add-on just does the transfer. Can you post a log using |
debug log and config attached. I couldn't see anything obvious in the log file. |
the backup is fully generated by the by supervisor, the only change I can think of that might impact what you are seeing is if you were using zip password before we have moved to using the supervisor's built in password option so it generates an encrypted tar instead of packing the tar in a zip. Otherwise looking at your logs the backup was successful, try making a backup manually from the UI, download it and see if it is corrupt, if not, try running the remote backup addon again. Also ensure you have sufficient free space on your home assistant machine to ensure it has enough space to complete the backup |
Thanks for looking at this. I can't be the only one using rclone to backup to a cloud service, so if it's not just my setup this issue should reappear. The only thing I've found is if I simply look inside a gz file, the ones that work the first line has for example �‹��'�Öb�ÿssl.tar í—]o£8�†s]©ÿ!ÊílƒÍ—a¤JC� characters , but in the same gz file in the failed backup it has 娔৬弓両灐ꆾↅ掯⨔䯈喝녨붵㻚崚厶 |
I just did a test restore, from the backup generated by this addon via the supervisor and I have a password applied I had to add the password to restore it or it just error-ed. Not using the rclone, but am using the ssl backup and the rsync. |
I've found the the issue. It's a very subtle thing related to the config file. With 7.2 I did not use a password to protect the backup, the config file had the option:- zip_password: "" |
Well if that is required it might be a bug. I didn't try with an empty password. |
Need to check when I"m back. There were some configuration option issues with non-existent entries versus empty string. This is not equal and causes troubles, probably also with the password setting. |
FWIW, I had to restore some files (ssl.tar.gz) from backup and experienced the same issue after upgrading to 2022.9.0 (thanks for providing this useful addon, though!) |
@realtmf Thanks for the feedback, I have an idea what the issue is, I'll provide a fix in the coming weeks. |
I have attempted a fix, it appears to work for me, I am going to release it now as it does appear to work, feel free to reopen this issue if you have any issues after updating |
Updated to 9.1 |
I am re-opening this issue due to a bug found by @SirGoodenough, it appears now it is always defaulting to no password, I think I have the solution, just need to test |
@ikifar2012 I think the easiest solution is to replace the default value remote-backup-addon/remote-backup/run.sh Line 101 in bae7265
Note that the right escaping needs to be used. Just an educated guess as I cannot test it at the moment. |
@patman15 I did try the single quotes yesterday and was unreliable, as sometimes the config returns null, as of right now I have an if statement working with a warning to the user that there backup is unencrypted if they use no password it seems to work, I am just about to push the pr, turns out the reason the if statement I pushed out yesterday didn't work was because of me using the var ${backup_password} instead of the config option "backup_password" |
Upgraded to 9.0 from 7.2
I use rclone to backup directly to pcloud. Previously worked faultlessly. Now backup folder is OK, but nested folders e.g. homeassistant.tar.gz do not open up - triggers message that not an archive or corrupted.
The text was updated successfully, but these errors were encountered: