How to keep copy command alive?

I would like to know how I can keep copy command working non-stop, basically upload file from Location1 to Location2 as I add file in Location1.
Yes, I am aware of sync function but I don't want to keep both location synced, just want to upload when I add something in Location1 and then delete.


as far as i know, rclone cannot do it but there are simple workarounds.

run rclone in a loop, running rclone sync every x minutes.
use rclone mount and any sync tool, for example, syncthing

1 Like

sync will copy from destination too, right? then that will be bad for me.

for syncthing, I am testing it now

no, rclone will not copy from dest to source
rclone syncs in one direction only, from source to dest.

oh so lets say I have below files in Source

and Destination has

then what will happen?

will it delete abc3 and add abc2?

correct. why not do a test?

touch ~/source/abc{1,2}
touch ~/dest/abc3
cp ~/source/abc1 ~/dest

rclone sync ~/source ~/dest -v --dry-run
NOTICE: abc2: Skipped copy as --dry-run is set (size 0)
NOTICE: abc3: Skipped delete as --dry-run is set (size 0)
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Checks:                 2 / 2, 100%
Deleted:                1 (files), 0 (dirs)
Transferred:            1 / 1, 100%
1 Like

I was bit afraid to test at first, thank you and I will try this solution out.
for syncthing, it is scanning folder and testing that out as well.

really appreciate your help

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