--dry-run doesn't work for local move?

What is the problem you are having with rclone?

I want to move data from one ZFS filesystem to another on the same system.

I do not have sufficient storage to have two copies of the entire dataset simultaneously on the server. However, the dataset consists of many small files. Therefore, I want to do a real-time "move and delete" operation. In other words, I'd like to have each file deleted from the source directory as soon as it has been copied and verified in the destination directory. Files that error during transfer should simply not be deleted (although this is unlikely to occur anyway on a local-to-local copy).

I want to verify with --dry-run that the behavior I expect will occur. However, using --dry-run just returns the message NOTICE: Local file system at /zfs/sourcedir: Skipped server-side directory move as --dry-run is set.

The result I want is that the contents of /zfs/sourcedir will be moved to /zfs/destdir. A file at the root of sourcedir should appear in the root of destdir - i.e. don't make a directory called sourcedir underneath destdir. As stated, I would like the deletes to occur during copy since I don't have enough storage to have two simultaneous copies.

I'll assume most people understand ZFS here, but in case someone doesn't, imagine this as equivalent to a disk-to-disk copy, i.e. it can't be accomplished by simply "moving" the file, it has to be read at the source, written at the destination, and then deleted from the source.

Run the command 'rclone version' and share the full output of the command.

rclone v1.60.0
- os/version: alpine 3.13.3 (64 bit)
- os/kernel: 5.15.38-1-lts (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.2
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Local only.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

root:/zfs# rclone move -vv --delete-during --dry-run -P sourcedir/ destdir/

The rclone config contents with secrets removed.

Config irrelevant since not using any remotes.

A log from the command with the -vv flag

2022/10/31 16:30:51 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone" "move" "-vv" "--delete-during" "--dry-run" "-P" "sourcedir/" "destdir/"]
2022/10/31 16:26:31 DEBUG : Creating backend with remote "sourcedir/"
2022/10/31 16:26:31 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/10/31 16:26:31 DEBUG : fs cache: renaming cache item "sourcedir/" to be canonical "/zfs/sourcedir"
2022/10/31 16:26:31 DEBUG : Creating backend with remote "destdir/"
2022/10/31 16:26:31 DEBUG : fs cache: renaming cache item "destdir/" to be canonical "/zfs/destdir"
2022/10/31 16:26:31 NOTICE: Local file system at /zfs/sourcedir: Skipped server-side directory move as --dry-run is set
2022/10/31 16:26:31 NOTICE:
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.0s

hi,

might try --disable=move - to prevent server-side move operations.
https://rclone.org/docs/#disable-feature-feature

--disable=move resulted in exactly the same result, but with the progress doubled and an extra output line:

2022-10-31 16:44:48 NOTICE: Local file system at /zfs/destdir: Skipped server-side directory move as --dry-run is set
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.0s
2022/10/31 16:44:48 NOTICE:
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.0s

2022/10/31 16:44:48 DEBUG : 2 go routines active

might try
rclone ls sourcedir/ > list.lst
and feed that to rclone move --files-from=list.lst --dry-run

actually I found it, --disable=dirmove,move seems to work at least to get the dry run output, thanks for pointing me in the right direction!

EDIT: it works fine. This command is achieving exactly what I expect:

rclone move --disable dirmove,move -P sourcedir destdir

ok, good that it works now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.