Hi Eric, Thank you so much for the reply. I spent multiple days trying things and researching (even after I sent my original email) and finally determined the problem was with the underlying connection between Linux and my phone. And MTP Sucks. I went through about 4 different MTP-based solutions, including simple-mtpfs (which is what I've used for years), gvfs, jmpfs, and others -- none of which solved the issue. Then I found adbfs, which uses the adb protocol to present a filesystem -- and Lo! and Behold! I was able to backup my phone!! So yeah, not a problem with rdiff-backup, but rather a problem with the underlying filesystem from the phone. Again, thank you for replying! -derek
On Tue, June 18, 2024 7:00 am, Eric L. wrote: > Hi Derek, > > I won't be very helpful but the issue appears within the open function > of Python, so not in the code of rdiff-backup (which doesn't mean that > we can't do anything about it, just that it is more difficult to > troubleshoot). > > From the look of it and knowing what I know about Android and MTP, I > guess an issue with either a user/group ID, time stamp or access rights, > or even the file descriptor. > Android looks like POSIX but it doesn't comply to it so you might have > hit one of those corner cases (why now and not before, no clue). > I could also imagine that you have an issue with the MTP file system > giving up on rdiff-backup opening and closing files with high frequency. > MTP isn't known to be the most performant thing in the world, to say the > least. > > Two more or less helpful hints: > > 1. solving the issue would probably require reproducing it with Python > code to understand the exact cause, before I would be potentially able > to find a workaround > 2. as an alternative to MTP (urk!), I've been playing with rdiff-backup > on my smart-phone with SSH using Termux. I wouldn't say that it was > production grade, but it worked (I didn't pursue the idea because I > didn't need it, I was just playing around). > > KR, Eric > > On 14.06.2024 16:26, Derek Atkins wrote: >> Hi, >> >> I've recently been attempting to backup my phone using rdiff backup. >> Last >> backup was successful 3 months ago (yeah, yeah, I know -- I should >> backup >> more often). >> >> I use mtpfs-simple to mount the phone as a file system on my Fedora-38 >> system and use rdiff-backup (rdiff-backup-2.2.6-3.fc38.x86_64) to sync >> it >> to my laptop. However, lately RDB has been barfing during the backup. >> The exact file where it errors out changes from attempt to attempt, but >> the error always appears to be the same: >> >> WARNING: Exception '[Errno 34] Numerical result out of range: >> b'/path/to/file'' raised of class '<class 'OSError'>': >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/robust.py", >> line >> 94, in check_common_error >> return function(*args) >> ^^^^^^^^^^^^^^^ >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/rpath.py", >> line >> 1129, in open >> return open(self.path, mode) >> ^^^^^^^^^^^^^^^^^^^^^ >> >> Traceback (most recent call last): >> File "/usr/bin/rdiff-backup", line 33, in <module> >> sys.exit(load_entry_point('rdiff-backup==2.2.6', 'console_scripts', >> 'rdiff-backup')()) >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> File "/usr/lib64/python3.11/site-packages/rdiffbackup/run.py", line >> 35, >> in main >> sys.exit(main_run(sys.argv[1:])) >> ^^^^^^^^^^^^^^^^^^^^^^ >> File "/usr/lib64/python3.11/site-packages/rdiffbackup/run.py", line >> 108, >> in main_run >> ret_val |= conn_act.run() >> ^^^^^^^^^^^^^^ >> File >> "/usr/lib64/python3.11/site-packages/rdiffbackup/actions/backup.py", >> line 154, in run >> backup.mirror_and_increment_compat200( >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/backup.py", >> line >> 53, in mirror_and_increment_compat200 >> DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath) >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/backup.py", >> line >> 208, in patch_and_increment >> for diff in rorpiter.FillInIter(source_diffiter, dest_rpath): >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/rorpiter.py", >> line 406, in FillInIter >> for rp in rpiter: >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/backup.py", >> line >> 134, in get_diffs >> attach_snapshot(diff_rorp, src_rp) >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/backup.py", >> line >> 96, in attach_snapshot >> fileobj = robust.check_common_error( >> ^^^^^^^^^^^^^^^^^^^^^^^^^^ >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/robust.py", >> line >> 94, in check_common_error >> return function(*args) >> ^^^^^^^^^^^^^^^ >> File "/usr/lib64/python3.11/site-packages/rdiff_backup/rpath.py", >> line >> 1129, in open >> return open(self.path, mode) >> ^^^^^^^^^^^^^^^^^^^^^ >> OSError: [Errno 34] Numerical result out of range: b'/path/to/file' >> >> >> The command-line is: >> >> rdiff-backup --exclude-globbing-filelist /path/of/my-excludes >> /path/to/source-dir /path/of/backup-dir >> >> >> Any ideas? >> >> Version 2.2.6 is the latest version available on F38. >> >> -derek > > > -- Derek Atkins 617-623-3745 de...@ihtfp.com www.ihtfp.com Computer and Internet Security Consultant