For a tape-based backup job that can have changes, I only want to back up "new" items but in this instance date-based filtering cannot be used.
I had planned to use rclone ls --exclude-if-present feature but it seems either I misunderstand it or it is not the best tool.
Essentially there are directories and from a given point in the hierarchy I'd run my rclone backup command to spool to tape. BUT I would NOT want a given directory [and its subs thereof] copied of a lock file is there.
So /root/dog/files... would be accepted but /root/cat/files would NOT backup /root/cat/* IF there was a lock file in /root/cat, e.g. .ignore
But in all my tests so far it seems to want to block everything from root, since ONE of the subdirs contains the lock file.
So if you see
~/storage/DB1-ENC/test tree -a
.
βββ 1
β βββ 1.txt
β βββ 2
β βββ 2.txt
β βββ 3
β βββ 3.txt
β βββ ignore.ignore
βββ temp
βββ 1
βββ 2
β βββ deep.txt
βββ .ignore
That temp dir should copy /deep/2 but it won't as this is the output I get as a test:
~/storage/DB1-ENC/test rclone ls DB1-ENC:test --exclude-if-present .ignore 0 1/1.txt 0 1/2/2.txt 0 1/2/3/3.txt 0 1/2/3/ignore.ignore
Would welcome guidance!
Run the command 'rclone version' and share the full output of the command.
rclone v1.62.2
- os/version: debian 11.7 (64 bit)
- os/kernel: 5.10.0-25-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: none
I tested it on my laptop with 1.64.1 too, unless that was used error.
Which cloud storage system are you using? (eg Google Drive)
Dropbox
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Shown in above example.
The rclone config contents with secrets removed.
I am presuming it isnot needed in this instance, everything else works
A log from the command with the -vv
flag
6:44 ~/storage/DB1-ENC/test rclone ls DB1-ENC:test --exclude-if-present .ignore -vv
2023/09/17 06:44:35 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "ls" "DB1-ENC:test" "--exclude-if-present" ".ignore" "-vv"]
2023/09/17 06:44:35 DEBUG : Creating backend with remote "DB1-ENC:test"
2023/09/17 06:44:35 DEBUG : Using config file from "/home/xxxxx/.config/rclone/rclone.conf"
2023/09/17 06:44:35 DEBUG : Creating backend with remote "DB1:rc/enc/0bcokthicd02sn38qhrelbf03o"
2023/09/17 06:44:36 DEBUG : temp: Excluded
0 1/1.txt
0 1/2/2.txt
0 1/2/3/3.txt
0 1/2/3/ignore.ignore
2023/09/17 06:44:38 DEBUG : 6 go routines active
2023/09/17 06:44:38 INFO : Dropbox root 'rc/enc/0bcokthicd02sn38qhrelbf03o': Committing uploads - please wait...
6:44 ~/storage/DB1-ENC/test ```