Can i have multiple rclone commands to the same remote in one script?

For example can i have these commands to a dropbox remote in a bash script and run the script with anacron:

rclone sync ~/folder1 exclude='~/folder1/somefile' dropbox:
rclone sync /data/folder2 exclude='/data/folder2/somefile' dropbox:
rclone sync /media/storage/folder3 exclude='/media/storage/folder3/somefile' dropbox:

Will this cause any issues with the remote service?

if you can run each command on the command in that order and the command do what you want,
then yes, you can use it as bash script

note: keep in mind that rclone sync can and will delete files in the dest!!!
need to be very careful about the dest directory.
since you are syncing to the root of dropbox, perhaps sync to subfolders

you can test by adding --dry-run to each command.

so i think you might modify the script as follows

rclone sync ~/folder1 --exclude='~/folder1/somefile' dropbox:folder1 --dry-run -v
rclone sync /data/folder2 --exclude='/data/folder2/somefile' dropbox:folder2 --dry-run  -v
rclone sync /media/storage/folder3 --exclude='/media/storage/folder3/somefile' dropbox:folder3 --dry-run -v

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