-
Notifications
You must be signed in to change notification settings - Fork 209
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
Excluded files/folders are deleted on "total restore" #1199
Comments
This comment was marked as outdated.
This comment was marked as outdated.
@solisinvictum I also do not understand your Issue in details. Can you report back please. After some experimenting I think this is a bug and @solisinvictum suggested a solution to it. The restore dialog offers the option Remove newer files in original folder. Steps to reproduce:
The main problem is that BIT/rsync do not take the exclude list into account. The excluded files/folders are not contained in the snapshot. That is why they are deleted in the source folder. It is IMHO a serious bug and I wonder why we do not hear about it more often.
Looking into this (restore) snapshot log there is a secondary problem.
The file |
I see a usability and documentation issue here: Newer files sounds different from "excluded" files to me (so I there is no indication what BiT will do with files with the existing ignored files in the source during restore). How about mentioning that excluded files and folders will also be lost (as first "fix")?
The OP says If this would be the solution I wonder if we should use the exclude list as it was when the snapshot was created or the most recent exclude list (which may be lost if the BiT profiles are missing eg. due to a hardware failure).
Restoring directly into the original folder is highly risky so perhaps this bug may not happen often (I remember only on case where the OP mentioned a loss of the original file by restoring directly into the original folder because of problems with the renaming of the original file). The tooltip is already mentioning the problem: Lines 1346 to 1354 in 59097f7
How about adding/improving the "are you sure" question to mention the full impact? I think we should not put too much effort in such risky restore operations (eg. other files neither contained in the snapshot nor in the exclude list may also get lost)... |
Uff its long ago. Yes, it seems now to be a bug. But so far i remember, 2021 this Option (delete newer files in original folder) didnt existed. The Problem about BackInTime in 2021 for me was, that if you created a snapshot of a folder, and restored it, you had duplicates in the same path/folder. One old File/Version, and one the newer one. But i wanted some Option, wich would allow me to make 1:1 snapshots/backups/images (whatever you want call it), and restore it exactly like the backup. Something like Timeshift would be perfect, but due to an incomprehensible reason Timeshift dont allow to use a (NFS-) Networkshare as Destination (origin developer said in some issues/posts thats because of hardlinks and rsync (wich isnt true, because it works fine)). So i created my own "solution". But thanks for you guys working on backintime! im eager to see for new improvements and bugfixes :) Edit: If i had a free wish, i would wish BackInTime would ditch rsync/$what_ever_is_used and would use something like Borg or duplicati. Because than the user could choose any backend (wich can be mounted or used with ftp, webdav, what ever) as destination. And could use options like compression, encryption, dedoublication or a combination of them. |
I guess implementation of the "Remove newer elements in original folder" restore option can be fixed here: backintime/common/snapshots.py Lines 478 to 482 in 726bffa
This code in the backintime/qt/restoredialog.py Lines 116 to 118 in 726bffa
Could this be "good first issue" for (not totally fresh) developers? |
Hi Guys,
i tried out BackInTime. Nice program. But only small problem:
The Restore option to delete everything what isnt in the snapshot.
It would be a great idea to simply write the excluded files and folder in the snapshot (as txt file or something), and to use this list to exclude what dont need to be deleted. Rsync supports that. Or to give the User option to set exclusions.
I implemented this in my script (for borg, but this script would work for backintime too with little change): https://github.com/solisinvictum/borgrestore
(support for borg would be great too. because borg can deduplicate and compress :P but i dont want to ask to much)
Thanks a lot.
The text was updated successfully, but these errors were encountered: