Rsync equivalent

Hi, I am doing a server backup (files, email, database) with the following rsync command:

rsync --delete -avzR source destination

I have a cronjob which runs every 30 mins. Even there is a hugh amount of files, the command is fast and reliable. Now I would like to change to rclone.

Can I use the following command to have a similar result?

rclone sync source remote:destination

Is there any compression for transfer? Are files checked recursivly? And what is about performance and reliability?

Thanks a lot for a few comments!

rclone sync is the equivalent of rsync--delete.

Rclone is recursive by default so no need for -R.

Rclone doesn't use the -a flag. You might consider the -M flag to preserve more metadata but whether this is useful depends on which cloud storage system you are using and what you want to acheive.

-v is the same!

Rclone doesn't support compression (the cloud storage providers don't).

So the rough equivalent would be

rclone sync -v source remote:destination
1 Like

Thanks for your explanation. I will give it a try.

Try first with -i for interactive confirmations or --dry-run

It is worth noting that rclone replaces the transfer utility part of rsync. Not the efficient transfers part (which also isn't compression but may be what you meant)

To be clear, rsync is two things:

  1. Tool to mirror (or clone) a directory structure from one source to another. It is done either locally or via SSH. It is one-way mirror.
  2. Algorithm used by the tool to do these transfers efficiently when a small change is made. With rsync, if there is a small change to even a big file, very little data other than that change needs to be propagated. This actually makes it less efficient for a big change to a big file but the end result is still the same file.

rclone is like the first bullet for rsync. It does directory cloning but supports a ridiculous number of backends including some meta (wrapper) ones for compression, encryption, chunking, etc. But it does not do anything with existing data.

If you just have SSH (or local) remotes, which one is better depends on your use case. rsync, to my knowledge, does one transfer at a time while rclone can do many. But rsync can reuse data better than rclone. So if you have big files with small changes, rsync is better. If you have lots of little files, rclone is better.

Obviously if you want to connect to anything but SSH and local or you want encryption, then rclone is your only option.

rclone also has the ability to mount or serve a remote. This is unrelated to the comparison with rsync but is a common use case.

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