Rclone - delete after move

I'm using standard move, transfer files from a local drive, an encrypted gdrive

rclone -v --stats-file-name-length 0 --exclude "*.partial~" move /mnt/4tb/media/ gcrypt-direct:/

However it would appear that the files, are removed before they are transferred, which means if the job is aborted for any reason, the job is lost. Is it possible to have the files transferred, then removed?? That way worst case is you have 2 copies of the file.

If it makes any difference, these are on 2 parts of a mergefs, that I am playing with.

Rclone does it the other way round

  • copy
  • delete source if copy successful

What makes you think it is doing delete first?

Because as soon as the copy starts the file disappears, I wonder if this is the old sonnar\radarr problem, where it copies the files, decides it's failed for no good reason then deletes it. Let me investigate, do a few manual transfers see what I find.

1 Like

I would look somewhere outside rclone if you suspect this is happening yea... rclone always deletes after move (ie. usually the safest possible thing to do) by default. You can change this behavior if you explicitly specify it, but then it would be obvious from the command.

If you enable debug log:
--log-level DEBUG
--log-file RcloneLog.txt
It also should tell you a lot of what it is doing, like deleting files.

It might actually be enough to run regular --verbose to get that info - which is much less of a pain to parse.

Either way it is probably much easier to see what is happening from the logs than it is to blindly experiment until you can infer a result.