-
Notifications
You must be signed in to change notification settings - Fork 203
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
Files with permissions r--r--r-- being repeatedly backed up #994
Comments
Further information, it appears that it is all the files with permissions r--r--r-- that it is getting wrong, at least having looked at a selection of failing ones they all have those permissions, and I can't see any with those permissions that have not failed. I will add just one file with those permissions and see if it fails reliably... |
Yet further information, it is to do with r--r--r-- files. It is necessary to close BiT and re-open it to trigger the problem, and in fact with those files often, but not always, if I open BiT and do a backup it will flip the permissions on those files between rw-r--r-- and r--r--r--. It is not only the first time after adding the file that it gets it wrong. |
This is still an issue. Running Linux Mint 20, backintime version 1.2.1. The 5TB /ext4 formatted backup disk is completely filling up, apparently because of this bug. The main disk is 2TB, and only about 35% filled, with most files unchanged for months or years. For example, this file: -rw-r--r-- 1 me me 116162688 Jan 19 2013 /backup/me/backintime/mc/me/1/20200927-230001-204/rest_of_path where "rest_of_path" = home/me/pcast/phc_130119.mp3 So sometimes it works, but most times it does not. Are there any workarounds I'm missing? P.S. The last backup started at 1200. It's now 1354, and maybe 40% finished. |
Sadly the maintainer appears to have lost interest, or suffered some awful fate, or something so unless someone else steps up to the plate then we are stuck with what we have. The only workaround that I could find was to change all the permissions on those files. |
I cannot now find the thread where it appeared, but adding these options in .config/backintime/config seems to do the trick profile1.snapshots.rsync_options.enabled=true the triple --no ignoring all the permissions. By "seems" I mean: works for at least one randomly selected file for the last week. Disk usage is down from ~ 90% to 49% as the older backups fall off. There are still a few backups that I'd like to keep, so it's going to stay at about 50%, but since it's a 5TB drive backing up a 2TB one it's not that big a deal. |
Presumably a side effect of that is that it does not save the permissions, group or owner. That may or may not be a serious issue. |
Executables are saved 755, other files 644. It doesn't change the owner/group for me, possibly because I'm saving it to a backup drive directory with the same ownership. It works for me, but YMMV. |
Hi there, I ran into the same problem. While just ignoring permission changes helps, this is not a real solution, as already pointed out. I created a simpe testcase in dir "test":
Subsequently I never made any changes to test and the files contained within. Maybe backintime or rsync or sth else does, but not me personally. first sync works as expected:
The next (second) snapshot doesn't see any changes - so of course no snapshot is taken (as specified in the profile's options).
... and so on:
Hopefully this can point into an insightful direction... PS and adding to the previous information - this at least explains why a diff in permissions if found every other time:
|
I have encountered the same issue: File that are originally Not sure why this happens. #1086 or #1128 are probably workarounds, but patching backintime to restore previous behavior is not exactly an elegant solution. |
Well, I just found that these read-only files are changed to Can anyone confirm this? |
It turned out that it's enough to delete any of the snapshots with read-only files - not necessarily the oldest one of them. |
I can't help thinking that this is connected to #988, but I'm not sure. |
Is anyone able to reproduce the problem and can provide the details steps for reproduction please? I observed that behaviour in the wild, too. But I'm not able to reproduce it in a test environment using files with permissions 444 or 666 everything went fine and behaved as expected. |
What does the ctime change have to with the change in permissions, though? 🤔 In your example, I understand how But I don't understand why its permissions jump from |
To me it is unclear if
|
Hard to say without
What is sure: This r/w ping pong does definitely cause unnecessary file copies in each new snapshot
This may explain some of the reports in #988 but others are perhaps only affected in the first snapshot with the new version (since it will do an almost complete new copy of all source files). Furthermore if the target file system does not support Linux permissions the file permissions may be lost in every snapshot causing a full backup in every snapshot (to be tested!). |
I have done some more scenario tests to find out if other constellations change the permissions of existing snapshot files too but it looks good. Proposal to fix the bugIf it should be a bug in ImpactThe proposed fix
Alternatives
Advantages:
Disadvantages:
Next steps
|
This would most probably also eliminate #988, which is another open mega-bug (that we don't understand as well as this one yet). It's an attractive solution in my mind, but we have to weigh the consequences carefully. |
This
There is also a proposed workaround using
|
Then maybe there's a chance to press this problem with the rsync devs? It's causing us significant "downstream trouble", after all. |
@buhtz knows more than any of us about rsync development, I think :) |
Sorry, but I have to say that currently I don't understand the details of your discussion. |
I have already written a question in the rsync mailing list: https://lists.samba.org/archive/rsync/2023-September/subject.html Depending on the feedback I will probably also bump the old open issue - I am registered user of Bugzilla for IMHO even a fix at the BTW: |
Thanks for leading the discussion with the rsync devs 👍 We need to keep in mind that BackInTime also has to deal with remote locations where we can't ssh in and call |
Do you mean For a) it would require to configure a restricted shell for Did you find such a setup in the wild? I was trying but did not succeed so far. Even the secured Hetzner Storage Box provides such a basic thing like I think we
Still I would prefer to keep the command dependencies on the remote-side small (= best to use only |
No, you're right. I was confused. A "full rsync mode" was once in development, but it never became a supported reality in BiT. We can probably rely on
I wonder if it's worth keeping the |
Using version 1.2 from stable ppa, on Ubuntu 19.04, backing up to local drive, sometimes files are being written to the snapshot with the wrong permissions. This makes itself known as after adding files and doing a snapshot if another snapshot is performed then sometimes files are modified showing permission differences. I have analysed one of these and see that for the orginal snapshot the permissions in fileinfo.bz2 do not match those in the written file, so I see
but
and I think 33060 maps to 100444 which is r--r--r-- which is what the source file is.
After running the second backup fileinfo still has 33060 but the permissions in that backup are r--r--r-- as they should be.
I can make the log for the first backup available if necessary but I would rather not do it publicly. There is nothing obviously odd for the entry for that file.
The text was updated successfully, but these errors were encountered: