Restore to folder in root directory failure
Summary
I was trying to do a test restore and decided to put the restore in a folder called test-restore in the root directory of my system. I changed permissions for that folder to be r/w for the current user. However, when I ran the restore, nothing actually went into this folder even though Dejadup spent a few minutes acting like it was doing something. I assume that, being a flatpak, Dejadup was dumping the restore into some virtual temp folder in memory, as it did ultimately fail with the below error (I have 16 GB of memory and the restore was close to 30 GB).
I assume restoring to a folder in the root directory is a no-no but I wonder if there was some other permission I could have given to it that would have made this work. I didn't anticipate an issue since Flatseal claims Dejadup has access to the entire filesystem, but I guess I was wrong. I don't consider this critical, as I was able to do a restore just fine when I made a test folder inside my user's home directory. This might be worth looking into if you have time though.
Reproduction Steps
- Make a folder in the root directory
- Grant r/w permissions to the current user
- Restore to the folder
Debug Information
Traceback (innermost last):
File "/app/bin/duplicity", line 62, in <module>
with_tempdir(main)
File "/app/bin/duplicity", line 53, in with_tempdir
fn()
File "/app/lib/python3.11/site-packages/duplicity/dup_main.py", line 1561, in main
do_backup(action)
File "/app/lib/python3.11/site-packages/duplicity/dup_main.py", line 1642, in do_backup
restore(col_stats)
File "/app/lib/python3.11/site-packages/duplicity/dup_main.py", line 810, in restore
if not patchdir.Write_ROPaths(config.local_path, restore_get_patched_rop_iter(col_stats)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/duplicity/patchdir.py", line 577, in Write_ROPaths
ITR(ropath.index, ropath)
File "/app/lib/python3.11/site-packages/duplicity/lazy.py", line 357, in __call__
robust.check_common_error(last_branch.on_error, last_branch.fast_process, args)
File "/app/lib/python3.11/site-packages/duplicity/robust.py", line 40, in check_common_error
return function(*args)
^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/duplicity/patchdir.py", line 633, in fast_process
ropath.copy(self.base_path.new_index(index))
File "/app/lib/python3.11/site-packages/duplicity/path.py", line 447, in copy
other.writefileobj(self.open("rb"))
File "/app/lib/python3.11/site-packages/duplicity/path.py", line 657, in writefileobj
fout.write(buf)
OSError: [Errno 28] No space left on device