Moveto and Move Seems to Be Copying and Not Moving Files

What is the problem you are having with rclone?

When trying to move and rename files to another directory, the "source" file still remains. When attempting to then delete the source file using "rclone delete" or "rclone deletefile", I get an "directory or doesn't exist: object not found" error. Then when deleting the file using an "rm ~/mount/file" command, both original file and the moved/copied file are deleted.

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

rclone v1.62.2

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.15.0-69-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.2
  • go/linking: static
  • go/tags: none

No

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

Google Drive
Using a crypt remote.

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

rclone moveto crypt:/ParentDir/ChildDir1/FileName.ext crypt:/ParentDir/ChildDir2/NewFileName.ext

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[remote]
type = drive
client_id = [redacted].apps.googleusercontent.com
client_secret = [redacted]
scope = drive
token = {"access_token":"[redacted]","token_type":"Bearer","refresh_token":"1/[redacted","expiry":"2023-12-09T10:11:40.995866135+01:00"}
root_folder_id = [redacted]

[Crypt1]
type = crypt
remote = [remote]:/ParentDir/ChildDir/Crypt1
filename_encryption = standard
directory_name_encryption = true
password = [redacted]
password2 =

[Crypt2]
type = crypt
remote = [remote]:/ParentDir/ChildDir/Crypt2
filename_encryption = standard
directory_name_encryption = true
password = [redacted]
password2 =

A log from the command that you were trying to run with the -vv flag

https://pastebin.com/f8fB1PGB
https://pastebin.com/bs65EiXW

What makes you to think that it is the case?

can you show an example? e.g.:

$ rclone lsf crypt:/ParentDir/ChildDir1/FileName.ext

$ rclone moveto crypt:/ParentDir/ChildDir1/FileName.ext crypt:/ParentDir/ChildDir2/NewFileName.ext

$ rclone lsf crypt:/ParentDir/ChildDir1/FileName.ext

Thanks for the response and the suggestion. It seems that via an rclone lsf command, the file is gone. But from an ls command, the file still shows up. Then an rm command deletes both files.

[prompt]:[WorkingDir$] ls -l ~/ParentDir/cryptmount/SubDir1
total 1
-rw-r--r-- 1 [username] hdxx 10 Dec  9 16:44 OriginalFileName.txt
[prompt]:[WorkingDir$] rclone lsf crypt:/SubDir1/OriginalFileName.txt
OriginalFileName.txt
[prompt]:[WorkingDir$] rclone moveto crypt:/SubDir1/OriginalFileName.txt crypt:/SubDir2/NewFileName.txt
[prompt]:[WorkingDir$] rclone lsf crypt:/SubDir2/NewFileName.txt
NewFileName.txt
[prompt]:[WorkingDir$] rclone lsf crypt:/SubDir1/OriginalFileName.txt
2023/12/09 17:49:01 ERROR : : error listing: directory not found
2023/12/09 17:49:01 Failed to lsf with 2 errors: last error was: error in ListJSON: directory not found
[prompt]:[WorkingDir$] ls -l ~/ParentDir/cryptmount/SubDir1
total 1
-rw-r--r-- 1 [username] hdxx 10 Dec  9 16:44 OriginalFileName.txt
[prompt]:[WorkingDir$] rclone deletefile crypt:/SubDir1/OriginalFileName.txt
2023/12/09 17:51:37 ERROR : Attempt 1/3 failed with 1 errors and: crypt:/SubDir1/OriginalFileName.txt is a directory or doesn't exist: object not found
2023/12/09 17:51:37 ERROR : Attempt 2/3 failed with 1 errors and: crypt:/SubDir1/OriginalFileName.txt is a directory or doesn't exist: object not found
2023/12/09 17:51:37 ERROR : Attempt 3/3 failed with 1 errors and: crypt:/SubDir1/OriginalFileName.txt is a directory or doesn't exist: object not found
2023/12/09 17:51:37 Failed to deletefile: crypt:/SubDir1/OriginalFileName.txt is a directory or doesn't exist: object not found
[prompt]:[WorkingDir$] rm ~/ParentDir/cryptmount/SubDir1/OriginalFileName.txt
[prompt]:[WorkingDir$] rclone lsf crypt:/SubDir2/NewFileName.txt
2023/12/09 17:52:16 ERROR : : error listing: directory not found
2023/12/09 17:52:16 Failed to lsf with 2 errors: last error was: error in ListJSON: directory not found

Ok. Now I think it is clear.

When you run rclone moveto it moves file in the remote. But it is not immediately reflected in your rclone mount - which is expected behaviour. It takes time depending on remote and mount command flags.

What exactly is your mount command?

Yes, I think you've gotten to the issue. These "ghost/cached pointers" seem to persist for days (at least). I'm not sure it was always like this. I believe these are my mount options.

/usr/local/bin/rclone mount \
  --log-file $logfile \
  --log-level INFO \
  --umask 022 \
  --allow-non-empty \
  --allow-other \
  --fuse-flag sync_read \
  --tpslimit 10 \
  --tpslimit-burst 10 \
  --dir-cache-time=160h \
  --buffer-size=64M \
  --use-mmap \
  --attr-timeout=1s \
  --vfs-read-chunk-size=2M \
  --vfs-read-chunk-size-limit=2G \
  --vfs-cache-max-age=5m \
  --vfs-cache-mode=minimal \
  --cache-dir ~/ParentDir/uploads \
  --config ~/.config/rclone/rclone.conf \
  --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.3
6"

Not sure what is your objective with customising all these parameters... but if you want changes to propagate faster remove:

 --dir-cache-time=160h \

Or wait 160h for any change on remote to appear in mount:) When you remove it - then it should happen within 5 min.

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