Hello,
Here a patch to fix the EINVAL error during 'bup save' when bup dir is
on a samba/cifs share:
bup save -r mybupserver:/path/to/bup -n some-backup /some/path
#
# Reading index: 115, done.
# Saving: 100.00% (327721/327721k, 115/115 files), done.
# Traceback (most recent call last):
# File "/usr/local/lib/bup/cmd/bup-server", line 209, in <module>
# cmd(conn, rest)
# File "/usr/local/lib/bup/cmd/bup-server", line 91, in
receive_objects_v2
# fullpath = w.close(run_midx=not dumb_server_mode)
# File "/usr/local/lib/bup/bup/git.py", line 790, in close
# return self._end(run_midx=run_midx)
# File "/usr/local/lib/bup/bup/git.py", line 776, in _end
# os.fsync(self.parentfd)
# OSError: [Errno 22] Invalid argument
# Traceback (most recent call last):
# File "/usr/local/lib/bup/cmd/bup-save", line 460, in <module>
# w.close() # must close before we can update the ref
# File "/usr/local/lib/bup/bup/client.py", line 317, in close
# id = self._end()
# File "/usr/local/lib/bup/bup/client.py", line 314, in _end
# return self.suggest_packs() # Returns last idx received
# File "/usr/local/lib/bup/bup/client.py", line 229, in _suggest_packs
# self.check_ok()
# File "/usr/local/lib/bup/bup/client.py", line 134, in check_ok
# % rv)
# bup.client.ClientError: server exited unexpectedly with code 1
This problem was first reported here:
https://groups.google.com/d/msg/bup-list/5rqPrlo_6h8/XYENSGjoAwAJ
Note that BorgBackup had the same issue, and was patched the same way
(see
https://github.com/borgbackup/borg/issues/1287,
https://github.com/borgbackup/borg/pull/1288/commits/0005023a7354856fafcea144110bcc2b42accd40).
Regards,
Michaël