Sync only one time


I need to know if there is any way that rclone sync only synchronize each local file with remote once.

If the remote file that has already been synchronized disappears, I don't want it to be synchronized again.

Is there any way to do this?

I need this because I synchronize a local folder (and subfolders) with a remote and then access the remote and there I organize those files into other folders so they disappear from the folder that synchronizes and therefore when I run rclone sync they are synchronized again since they are still local (and from there I do not want to delete them).

Thanks in advance

hello and welcome to the forum,

the problem is,
for a specific source file, rclone could not know the reason it is missing from the dest.
there might be some rclone flag, but not sure what it is, perhaps --magic :upside_down_face:

And any other way to do this? I’ve tried with magic flag but it doesn’t work :joy:

well, since you respect the --magic, i might have an idea.

might try a simple script,
that saves the timestamp each time it is run,
then use that with --max-age

That sounds great, but I'm afraid I don't know much about scripting. I would be very grateful if you could help me

I have only a symple script that syncs local to remote

if pidof -o %PPID -x ""; then
exit 1
rclone sync /home/fer/files remote:files2order/

Thanks in advance

truth is that the script idea would work, but without scripting experience, could easily fail to work as intended and then rclone would re-sync all those files and make a mess.

perhaps another rcloner will stop by and offer another, better solution.

I think the timestamp idea could work, but it does depend on the timestamps of the source files and they might not be recent.

Another idea might be to list the remote after the sync then feed that back into rclone as an exclude file


rclone lsf --files-only --recursive --absolute remote:files2order/ > exclude-files

Then feed that back into your sync

rclone sync /home/fer/files remote:files2order/ --exclude-from exclude-files

That will probably work find for a few thousand files. If you had millions of files then the exclude file will get very slow...

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