What is the problem you are having with rclone?
I am trying to run the bisync
command with the --remove-empty-dirs
option to remove all empty directories, but I want it to ignore the .stfolder
directory and not act on it, for that I am using an --exclude
but it seems to ignore it.
Run the command 'rclone version' and share the full output of the command.
$ rclone --version
rclone v1.63.0
- os/version: arch (64 bit)
- os/kernel: 6.2.10-1-aarch64-ARCH (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.20.5
- go/linking: dynamic
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
It's Dropbox, but I think it happens with any storage backend.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone -vv --dry-run \
--stats 10m --transfers 16 \
--exclude .stfolder \
bisync --remove-empty-dirs \
dropbox: /mnt/dropbox/
The rclone config contents with secrets removed.
[dropbox]
type = dropbox
token = {"access_token":"thetoken","token_type":"bearer","refresh_token":"theothertoken","expiry":"thedate"}
A log from the command with the -vv
flag
2023/08/01 09:04:15 DEBUG : rclone: Version "v1.63.0" starting with parameters ["rclone" "-vv" "--dry-run" "--stats" "10m" "--transfers" "16" "--exclude" ".stfolder" "bisync" "--remove-empty-dirs" "dropbox:" "/mnt/dropbox/"]
2023/08/01 09:04:15 DEBUG : Creating backend with remote "dropbox:"
2023/08/01 09:04:15 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2023/08/01 09:04:15 DEBUG : Creating backend with remote "/mnt/dropbox/"
2023/08/01 09:04:15 DEBUG : fs cache: renaming cache item "/mnt/dropbox/" to be canonical "/mnt/dropbox"
2023/08/01 09:04:15 NOTICE: bisync is EXPERIMENTAL. Don't use in production!
2023/08/01 09:04:15 INFO : Synching Path1 "dropbox:/" with Path2 "/mnt/dropbox/"
2023/08/01 09:04:15 INFO : Path1 checking for diffs
2023/08/01 09:04:23 INFO : Path2 checking for diffs
2023/08/01 09:04:35 INFO : No changes found
2023/08/01 09:04:35 INFO : Updating listings
2023/08/01 09:04:35 INFO : Removing empty directories
2023/08/01 09:04:43 NOTICE: .stfolder: Skipped remove directory as --dry-run is set
2023/08/01 09:04:43 INFO : Bisync successful
2023/08/01 09:04:43 NOTICE:
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Deleted: 0 (files), 1 (dirs)
Elapsed time: 28.3s
2023/08/01 09:04:43 DEBUG : 7 go routines active
2023/08/01 09:04:43 INFO : Dropbox root '': Committing uploads - please wait...
I understand that the log should say that it does not act on .stfolder
because it is filtered, but instead it says that it does not delete it because it is running with --dry-run
. If I run rclone
without --dry-run
it deletes the directory.