Is there a way to display the amount of data deleted by the move command

What is the problem you are having with rclone?

I frequently run
rclone copy <src> <dest>
followed by
rclone --min-age 4w move <same src> <same dest>

This does what I want (copies everything and removes old things from source), but I don't get any statistics on how much is deleted. Is there a flag to make it total the data deleted because it already existed on the destination?

What is your rclone version (output from rclone version)

rclone v1.47.0

Which OS you are using and how many bits (eg Windows 7, 64 bit

debian, 64bit

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

Google Drive

copy and then move seems redundant. it will compare a lot of files twice.

Why not rclone copy + rclone delete (on source) with the same filter flag? that will go much faster and should produce the same result as what you are effectively doing with your "move" there is to delete anyway , and if you add -P to that you should get some statistics out of it I think. Not exactly sure since I rarely do bulk-deletions like this, but I'd give that a shot.

adding -P to the move instead you should be able to tell roughly too - by comparing number of checks to number of transfers. Anything checked but not transferred would have been deleted I'm fairly sure.

And lastly, you could just log the whole event using --log-file=mylogfile.txt and --log-level NOTIFY (or it might be INFO to include deletes). Then you always can analyse this via script externally. This is a bit of work though... just mentioning it as an option.

The subsequent move is very fast (~20 seconds). It does compare all of the things meeting the --min-age filter, which is what I want. I'm about to delete the local copy, and I'm happy to have a final verification that they exist on the remote destination.

-P with either move or delete gives you the number of checks but only totals transferred bytes of which there are none. I can -v and get a list of the files deleted. I can du -h before and after to get the number of bytes which disappeared. It seems like rclone should know that number as a matter of course, I'm just wondering if there's a way to make it display it.

You can probably only get the the number of files from P yea, unless delete works different for those stats, you'd have to test but I suspect not.

I'm not aware of any very simple and direct way of getting the size output of a delete. no. But I might just be unaware of it. I am still learning more about rclone every day.

Seems like it would be a relatively easy thing to custom script though by just saving the folder size to a local variable before sync, then subtract the size after and output.

Today you'd need to look at the logs produced with -v.

Though there are discussions ongoing at the moment about increasing the number of stats rclone can show and deleted files is one of those.

I can't find the issue at the moment!

Probably https://github.com/rclone/rclone/issues/1817

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