Skip to content
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

Backup Removable Storage #4927

Open
WhatCats opened this issue Apr 26, 2023 · 4 comments
Open

Backup Removable Storage #4927

WhatCats opened this issue Apr 26, 2023 · 4 comments
Labels

Comments

@WhatCats
Copy link

WhatCats commented Apr 26, 2023

If you try and backup a removeable drive like a USB Stick and you remove it and you have the ignore if source is missing option enabled or you tell it not to backup with the run-script-before option and a exit code of 1, it will create a backup containing nothing (0 bytes) that will overwrite your versions of successfull backups and it will end up looking like this Backup: 0 bytes / 0 Versions.

I find this behaviour very non ideal since I would like to keep my backups if I disconnect my USB Stick.

@drwtsn32x
Copy link
Contributor

This is a display bug. You did not lose any backup versions when the backup is canceled by run-script-before exit code.

@Bluejanis
Copy link

The option ignore if source is missing has a confusing name / function.

Without the option, we get errors when a partition is missing. But the new backup will still contain the previously backed up data.
I expected the option to do the same, but without causing the error messages.
Well, those error messages are gone, but the new backup will not contain the previously backed up data anymore.

It seems best to not use the option and just live with the errors we get.

Maybe we could change the option into a tri-state to allow "ignore errors, but keep files"?

@WhatCats
Copy link
Author

I see, it does indeed seem to be a display bug and when you actually go to restore the previous versions are still there. It would still be nice though if there was a better way to back up removeable storage then "live with the errors" or having to write a run-before-script that checks if the device is connected. Maybe an option like skip-backup-if-source-missing and an option to start a backup once a device is connected would also be cool.

@WhatCats WhatCats changed the title Removeable Drives Backup Removable Storage Apr 27, 2023
@Jojo-1000
Copy link
Contributor

The 0 Versions bug is from #4829 and should be fixed in master, so you can now properly use a script to skip the backup if the drive is missing.

The other option is --allow-missing-source (this does not show 0 Versions when the drive is missing). It would be possible to change the behavior of this option to skip the backup if all sources are missing (as if no files were changed). I am not sure how this option is used normally, but this would be more intuitive when backing up a single removable drive.
This would be a difference to the current empty version, which also impacts backup retention. I believe changing from creating an empty version to no version will improve the version history. With a limited number of kept versions, there is the possibility of keeping an empty version and removing all "real" ones. I think this is enough of a reason to change the existing option behavior, so it is more difficult to screw up your backup data.

Keeping missing source directories unchanged from the previous version in a multiple-source scenario is more difficult to implement, and I would not suggest it unless we create a new option for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants