What is the problem you are having with rclone?
When syncing from a source to a destination I would like to exclude certain files from being deleted on the remote, in particular auto-generated *.sdr/
folders on my eReader. I've tried using --exclude "**/*.sdr/"
, however this has had no effect as it continues to (not actually as --dry-run) delete files on the destination.
The intention is that it DOES delete OTHER files that are not excluded. For example if I rename a .pdf file it should delete the original filename (while cloning the new name). But it shouldn't delete the excluded *.sdr/
files on the destination.
What is your rclone version (output from rclone version
)
rclone v1.55.1
- os/type: linux
- os/arch: amd64
- go/version: go1.16.3
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (eg Windows 7, 64 bit)
ChromeOS 91/Crostini Linux which is a modified version of Debian 10.
Which cloud storage system are you using? (eg Google Drive)
Onedrive is the source, however the destination is just a directory (mounted through ChromeOS).
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone sync --dry-run -P "onedrive:/Course Materials/UC/MATH416/" . --exclude "/**/*.sdr/"
# Also tried with "**/*.sdr", "**/*.sdr/", "/**/*.sdr" so I don't think it's to do with the pattern
The rclone config contents with secrets removed.
[onedrive]
type = onedrive
region = global
token = <<OMITTED>>
drive_id = <<OMITTED>>
drive_type = personal
[googleDrive]
type = drive
scope = drive
token = <<OMITTED>>
A log from the command with the -vv
flag
<7>DEBUG : Using config file from "/home/jamesernator/.config/rclone/rclone.conf"
<7>DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "sync" "--dry-run" "-P" "onedrive:/Course Materials/UC/MATH416/" "." "--exclude" "/**/*.sdr/" "-vv"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Creating backend with remote "onedrive:/Course Materials/UC/MATH416/"
<7>DEBUG : fs cache: renaming cache item "onedrive:/Course Materials/UC/MATH416/" to be canonical "onedrive:Course Materials/UC/MATH416"
<7>DEBUG : Creating backend with remote "."
<7>DEBUG : fs cache: renaming cache item "." to be canonical "/mnt/chromeos/removable/KOBOeReader/Course Materials/MATH416"
2021-07-08 23:04:13 DEBUG : 416.pdf: Modification times differ by -1s: 2021-03-04 02:42:01 +0000 UTC, 2021-03-04 15:42:00 +1300 NZDT
2021-07-08 23:04:13 DEBUG : Exam.pdf: Size and modification time the same (differ by 0s, within tolerance 1s)
2021-07-08 23:04:13 DEBUG : Exam.pdf: Unchanged skipping
2021-07-08 23:04:13 DEBUG : Local file system at /mnt/chromeos/removable/KOBOeReader/Course Materials/MATH416: Waiting for checks to finish
2021-07-08 23:04:13 DEBUG : 416.pdf: SHA-1 = ad095e6da60f40fdb389b535cd900c50666eb0fb OK
2021-07-08 23:04:13 NOTICE: 416.pdf: Skipped update modification time as --dry-run is set (size 374.751k)
2021-07-08 23:04:13 DEBUG : 416.pdf: Unchanged skipping
2021-07-08 23:04:13 DEBUG : Local file system at /mnt/chromeos/removable/KOBOeReader/Course Materials/MATH416: Waiting for transfers to finish
2021-07-08 23:04:13 DEBUG : Waiting for deletions to finish
2021-07-08 23:04:13 NOTICE: 416.sdr/metadata.pdf.lua: Skipped delete as --dry-run is set (size 3.157k)
2021-07-08 23:04:13 NOTICE: 416.sdr: Skipped remove directory as --dry-run is set
2021-07-08 23:04:13 DEBUG : Local file system at /mnt/chromeos/removable/KOBOeReader/Course Materials/MATH416: deleted 1 directories
2021-07-08 23:04:13 INFO : There was nothing to transfer
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 3 / 3, 100%
Deleted: 1 (files), 1 (dirs)
Elapsed time: 3.2s
<5>NOTICE:
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks: 3 / 3, 100%
Deleted: 1 (files), 1 (dirs)
Elapsed time: 3.2s
<7>DEBUG : 4 go routines active