2018/06/25 02:28:05 DEBUG : rclone: Version “v1.41” starting with parameters [“rclone” “sync” “/” “/run/media/wolfv/big_stick/backup_wolfv/last_snapshot” “–backup-dir=/run/media/wolfv/big_stick/backup_wolfv/old_files” “–suffix=_2018-06-25_02:10:05” “–filter-from=/DATA/Documents/pc_maintenance/backup_systems/rclone_wolf/filter_rules” “–checksum” “–log-level=DEBUG” “–dry-run”]
2018/06/25 02:28:05 DEBUG : Using config file from “/home/wolfv/.config/rclone/rclone.conf”
2018/06/25 02:28:05 INFO : Local file system at /run/media/wolfv/big_stick/backup_wolfv/last_snapshot: Modify window is 1ns
2018/06/25 02:28:05 ERROR : Fatal error received - not attempting retries
2018/06/25 02:28:05 Failed to sync: source and parameter to --backup-dir mustn’t overlap
You are attempting to sync / to /run/media/wolfv... but you can find the latter path under / so if you sync it like that you’ll make recursive copies of one under the other.
You want to use the -x flag to make sure rclone stays on the single filesystem. Unfortunately you’ll still get the musn’t overlap messages, so you’d need to fool rclone by making another remote. So make a local remote called big_stick pointing to /run/media/wolfv/big_stick/ and you can get it to work.
How to make a local remote point to /run/media/wolfv/big_stick/ ?
I entered “rclone config” and selected “13 / Local Disk”.
But there is no option to set path https://rclone.org/commands/rclone_config/
Ah, sorry I forgot, you don’t set the path, you enter it each time. So you’d enter local:/run/media/wolfv/big_stick/. You could make an alias for that to save typing.
Thanks ncw.
The following is a more detailed description of the issue.
Here is the filter_rules file, where “.spacemacs” is a file:
+ /home/wolfv/.spacemacs
+ /DATA/**
+ *
Source is / (root)
DATA is a different partition mounted on root.
Destination is a USB drive mounted on root.
I created a local remote named “local”, and put the USB drive on it:
local:/run/media/wolfv/big_stick/wolfv_backup
I added --one-file-system to the rclone command but still get the same “–backup-dir mustn’t overlap” error:
$ rclone sync / /run/media/wolfv/big_stick/wolfv_backup/last_snapshot --backup-dir=local:/run/media/wolfv/big_stick/wolfv_backup/old_files --suffix=_2018-06-28_09:17:59 --filter-from=/DATA/Documents/pc_maintenance/backup_systems/rclone_wolf/filter_rules --log-level=DEBUG --one-file-system --dry-run
2018/06/28 10:53:52 DEBUG : rclone: Version "v1.41" starting with parameters ["rclone" "sync" "/" "/run/media/wolfv/big_stick/wolfv_backup/last_snapshot" "--backup-dir=local:/run/media/wolfv/big_stick/wolfv_backup/old_files" "--suffix=_2018-06-28_09:17:59" "--filter-from=/DATA/Documents/pc_maintenance/backup_systems/rclone_wolf/filter_rules" "--log-level=DEBUG" "--one-file-system" "--dry-run"]
2018/06/28 10:53:52 DEBUG : Using config file from "/home/wolfv/.config/rclone/rclone.conf"
2018/06/28 10:53:52 INFO : Local file system at /run/media/wolfv/big_stick/wolfv_backup/last_snapshot: Modify window is 1ns
2018/06/28 10:53:52 ERROR : Fatal error received - not attempting retries
2018/06/28 10:53:52 Failed to sync: source and parameter to --backup-dir mustn't overlap
This is similar to Sync two partitions with one rclone command? but with the addition of --one-file-system and --backup-dir=local:/run/media/wolfv/big_stick/wolfv_backup/old_files
(I apologize for double posting, I originally thought they were two separate issues).
Once the “–backup-dir mustn’t overlap” error is resolved, there is still the matter of --one-file-system flag: --one-file-system is needed to fix “–backup-dir mustn’t overlap” error. --one-file-system breaks access to the /DATA partition, as it did in Sync two partitions with one rclone command?
Do you see a way out of this conundrum?
Rename your local remote to say localdisk - I’ve realised calling it local is the name it normally gets so the workaround isn’t working!
Then your sync should work with or without --one-file-system.
I think what I should do is make the test for overlapping directories test to see whether the --backup-dir is excluded - then you wouldn’t have to mess about with making a different named remote to fool it.