-
Notifications
You must be signed in to change notification settings - Fork 208
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
Master issue for "error 23" (rsync returns with exit code 23: Partial transfer due to errors) #1587
Comments
It might help or give us some more ideas if we would involve the rsync-folks and -maintainer via their mailing list. I assume there is a reason why multiple problems are summarized with one single error code. |
FYI: I have just posted my questions at the rsync mailing list but without debugging
|
Internal note: I have examined the
|
Ideally, I would prefer the solution where an rsync-23 marks a snapshot as "with warnings" (in addition to "with errors"). Users could then clear the warnings (e.g. by renaming the snapshot). I don't think it's worth the trouble of second-guessing rsync by trying to figure out why exactly a 23 was returned. Users can do that by looking at the logs. |
With my current but limited knowledge I also do prefer "with warnings". They have to investigate the log files etc pp This is also related to our log-file-parsing issue. When we are able to parse the log file then we are able to give better feedback to the user which type of code 23 caused the warning. But in a first place I would say a link to a docu/faq would be enough in the first place. |
This would be my preferred (and perfect) solution too. Unfortunately
All this is IMHO too risky and time consuming ATM (I prefer to prepare the next release for Jan, 2023 and the Qt6 release then). I propose to
|
…it-team#1587 - Corrects some other typos in code comments - Add global locking details to dev doc of control files usage
FAQ and dev doc: Closes #1166, #1582. Contributes to #1555 and #1587 - Add FAQ entry: Snapshot "WITH ERRORS": [E] 'rsync' ended with exit code 23 - Add FAQ entry: Does BiT support full system backups? - Add FAQ entry: Does BiT support backups on cloud storage like OneDrive or Google Drive? - Corrects some other typos in code comments - Add details about global locking to dev doc of control files usage
* rsync exit code 23 is now in the ignore list * Add experimental "rsync transfer failures" filter to snapshot log view * Exclude 'SingletonLock' and 'SingletonCookie' (Discord) and 'lock' (Mozilla Firefox) files by default (part of bit-team#1555)
…napshot log filter (#1621) * Work around for rsync exit code 23: Is no longer an error by adding it to the rsync exit code ignore list (#1587) * Add experimental "rsync transfer failures" filter to snapshot log view * Add links to rsync source code for rsync transfer failure filter * Exclude 'SingletonLock' and 'SingletonCookie' (Discord) and 'lock' (Mozilla Firefox) files by default (part of #1555) * Travis CI config file adjustments since coverage does fail with absolute path to Python for unknown reason (only relative path works) * CI: Remove sudo because travis says so ("no effect anymore") --------- Co-authored-by: aryoda <[email protected]> Co-authored-by: Christian Buhtz <[email protected]>
FYI: The new BiT release v1.4.3 does |
1.4.3 continues to make the snapshot fail:
What's troubling is that the lock file has not been deleted within 300 seconds after the error has been detected in my
|
Here is the matching log in
|
Internal note: The error recognition in the snapshot log is here: backintime/common/snapshots.py Lines 917 to 923 in 9ea0d80
|
|
Actually, I do believe the error has been caused only by rsync error 23; here are the sole errors present in the same log:
$3=2 when the email was sent.
I will try when I find the time.
and at the end of all snapshots, I get:
matching precisely the number of previous |
Unfortunately, I've just realized that the lock file is not removed as long as the user-callback is running, so the latter can wait forever for the lock file to be deleted before moving on... so it's a catch-22 situation! The only way out is to delete the lock file inside the user-callback script just before moving on. |
No luck, it does not work, the whole process is stopped when the lock file is manually deleted. |
I have "lost" the overall view, do you think there is an open bug in BiT (
That is strange, I see now obvious indication in our source code why BiT should fail if an existing lock file is deleted. I think you urgently need my proposed FR #1591 (on my list but currently I am focusing on our Qt5 to Qt6 migration of the GUI code)...
It looks like you are using the If you want you could describe your requirements in a new issue as FR and we could think about if and how to implement this in BiT instead... |
* aryoda ***@***.***> [02-12-24 04:00]:
>> Work around: Relax `rsync` exit code 23: Ignore instead of error now (part of #1587)
> 1.4.3 continues to make the snapshot fail:
I have "lost" the overall view, do you think there is an open bug in BiT (`1.4.4-dev` version, above change is not yet released!) that I should fix?
I get these, code 23, occasionally on 1.4.4-dev. sporadically over last
several months.
… Message ID: ***@***.***>
--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
|
* paka ***@***.***> [02-12-24 08:34]:
* aryoda ***@***.***> [02-12-24 04:00]:
> >> Work around: Relax `rsync` exit code 23: Ignore instead of error now (part of #1587)
> > 1.4.3 continues to make the snapshot fail:
>
> I have "lost" the overall view, do you think there is an open bug in BiT (`1.4.4-dev` version, above change is not yet released!) that I should fix?
I get these, code 23, occasionally on 1.4.4-dev. sporadically over last
several months.
> Message ID: ***@***.***>
> Message ID: ***@***.***>
[I] Take snapshot (rsync: sent 3.07G bytes received 118.64K bytes 30.90M
bytes/sec)
[I] Take snapshot (rsync: total size is 56.00G speedup is 18.21)
[I] Take snapshot (rsync: rsync warning: some files vanished before they
could be
transferred (code 24) at main.c(1336) [sender=3.2.7])
[I] 'rsync' ended with exit code 24: Partial transfer due to vanished
source files
(see 'man rsync')
[I] Saving config file…
[I] Saving permissions…
1.4.4-def 2349c31
…--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
|
* paka ***@***.***> [02-12-24 18:25]:
* paka ***@***.***> [02-12-24 08:34]:
> * aryoda ***@***.***> [02-12-24 04:00]:
> > >> Work around: Relax `rsync` exit code 23: Ignore instead of error now (part of #1587)
> > > 1.4.3 continues to make the snapshot fail:
> >
> > I have "lost" the overall view, do you think there is an open bug in BiT (`1.4.4-dev` version, above change is not yet released!) that I should fix?
>
> I get these, code 23, occasionally on 1.4.4-dev. sporadically over last
> several months.
>
> > Message ID: ***@***.***>
>> Message ID: ***@***.***>
[I] Take snapshot (rsync: sent 3.07G bytes received 118.64K bytes 30.90M
bytes/sec)
[I] Take snapshot (rsync: total size is 56.00G speedup is 18.21)
[I] Take snapshot (rsync: rsync warning: some files vanished before they
could be
transferred (code 24) at main.c(1336) [sender=3.2.7])
[I] 'rsync' ended with exit code 24: Partial transfer due to vanished
source files
(see 'man rsync')
[I] Saving config file…
[I] Saving permissions…
1.4.4-def 2349c31
Message ID: ***@***.***>
uups, this one is code 24.
…--
(paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri
http://en.opensuse.org openSUSE Community Member facebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet oftc
|
So it seems that the rsync error 23 is no longer treated as an error in
Urgently is a strong word, I'd rather say ASAP, and definitely before
I think you mean "special requirements to BiT that are currently NOT available" (or did I missed something?). |
Yes. I hope this does not cause new problems in your workflow (mainly: user callback script), my goal was to relax this again until we introduce "warnings" as third "take snapshot" result type...
OK, I will check the source code next week to estimate how much work (and possibly risks) this implies...
Ah yes, I forgot the word "not" and meant indeed "currently not available" :-) If you think your requirements help to improve BiT and are also helpful for others a PR is really welcome! |
@jean-christophe-manciot Would it be possible to help me finalizing the requirements for #1591 (esp. how to cope with user callback calls in case of errors). I continue the conversation related to "retries" in #1591 ... |
No worries. I'll adapt. |
Hello Jürgen, It seems to by very important because it is pinned overall other issues. Regards, |
This issue is meant to centralize all "error 23" issues to discuss a common solution...
Background
BiT Version 1.4.0 (2023-09-14) introduced the evaluation of
rsync
exit codes for better error recognition:backintime/CHANGES
Lines 32 to 42 in 726bffa
Before this change
rsync
errors reported only via exit code were hidden and left users with the feeling that everything worked well (but didn't).Collected reasons for
rsync
exit code 23The final error message in the snapshot log is always
Here are typical snapshot log entries causing exit code 23 (shall be extended here to be extended step by step to get a holistic picture):
[I] Take snapshot (rsync: symlink has no referent: "/home/user/Documents/dead-link")
[E] Error: rsync: [sender] send_files failed to open "/home/user/Documents/root_only_file.txt": Permission denied (13)
Other known reasons: See #1587 (comment)
Current impact
Some of the reasons for exit code 23 may be out of control of the BiT user or are OK to be ignored since not considered as "severe" (eg. dead links).
Despite that BiT snapshots do always fail with an error now.
Even though
rsync
treats exit code 23 always as error the BiT user should have the freedom to treat some reasons for exit code 23 as INFO or WARNING only...Possible solutions
Add exit code 23 to the ignore list (as before) and let the user think everything went OK (until looking into the snapshot log)
backintime/common/snapshots.py
Lines 1247 to 1252 in 726bffa
Find and use
rsync
options so that we can ignore minor exit code 23 reasons:https://unix.stackexchange.com/questions/598736/how-to-skip-copying-broken-links-with-rsync-copy-links
Introduce a new snapshot result state "Warning" (currently we have only "OK" and "with errors)
backintime/common/snapshots.py
Lines 1110 to 1131 in 726bffa
Challenges
rsync
has several reasons for exit code 23 and always treats it as an error.Related issues
The text was updated successfully, but these errors were encountered: