restic: Backing up multiple filesystems at different mountpoints fails with --one-file-system (-x)
Output of restic version
restic 0.9.0 compiled with go1.10.2 on linux/amd64
How did you run restic exactly?
restic -r sftp:backup:/restic backup -x -e “/mnt/Z/backups/dir1” / /mnt/Z/backups
What backend/server/service did you use to store the repository?
sftp
Expected behavior
I expected / and /mnt/Z/backups to be backed up, but /mnt/Z/backups/dir1 to be excluded from the backup. Getting a snapshot listing shows /mnt/Z/backups, but nothing from that path is visible in a listing (ls -l) of the snapshot.
Actual behavior
Restic backed up /, without traversing any other mounted filesystems - including /mnt/Z/backups.
Steps to reproduce the behavior
Run restic with multiple filesystems as command line arguments and --one-file-system. I don’t believe excluding a directory has anything to do with the issue at hand.
Do you have any idea what may have caused this?
I believe restic is using the first path on the backup command line as its source filesystem for checking against with --one-file-system instead of treating each path on the command line as its own source filesystem for traversal of that path.
Do you have an idea how to solve the issue?
No. In the past I’d backed up all paths individually but now with fixes to 0.9.0 I wanted to back them all up in a single command line. I can return to backing things up individually but that’s a workaround.
Did restic help you or made you happy in any way?
I love restic!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
I can reproduce it, thanks!
Ok, thanks for the confirmation. So what you tried to do was backup
/without e.g./sysand/devand so on, but including/mnt/Z/backups(which resides on a different file system,/mnt/Z), is that right?