Rclone has a wealth of features. Generally, Rclone is used to copy files from the local drive to a cloud storage provider like Dropbox or Google Drive and vice versa. How about copying files between two different cloud providers? Yes, It is also possible! In this brief guide, we will see how to transfer files between Dropbox and Google Drive with Rclone in Linux.
As you may already aware, Rclone doesn't use the local drive while synchronizing files between two different cloud providers. Rclone employs server-side transfers to minimize the local bandwidth use and transfers the data from one provider to another without using local disk. Hence, it reduces disk writes and local network bandwidth significantly.
Configure Rclone With Dropbox And Google Drive
In order to transfer data between two cloud providers, we need to configure Rclone with those cloud providers.
We already have discussed how to mount Dropbox and Google Drive locally using Rclone and how to transfer files from the local system to Dropbox or Google drive and vice versa.
Refer the following guides to know how to configure Dropbox and Google drive with rclone and them mount them locally using Rclone.
- How To Mount Google Drive Locally Using Rclone In Linux
- How To Mount Dropbox Locally Using Rclone In Linux
Now, let us go ahead and sync files between Dropbox and Google Drive with Rclone in Linux.
This procedure is not just for transferring files between Dropbox and Google drive but for any two cloud providers. A few steps will differ but the procedure is almost same.
Transfer Files Between Dropbox And Google Drive With Rclone
I assume you've already configured Dropbox and Google drive with Rclone as described in the aforementioned links.
Let me show you my configured remotes (Cloud providers, of course):
$ rclone listremotes mydropbox: mygdrive:
As you see, I have configured Dropbox and Google drive accounts with Rclone.
Now let us copy a folder named "Test" from Google drive to Dropbox with Rclone using the following command:
$ rclone copy mygdrive:Test mydropbox:Test
Replace the name of the remote and folder in the above command with your own.
Let us check the contents of "Test" folder on both Dropbox and Google Drive.
View contents of Test folder in Google Drive:
$ rclone ls mygdrive:Test 15860 ostechnix logo.png
View the contents of Test folder in Dropbox:
$ rclone ls mydropbox:Test 15860 ostechnix logo.png
As you see in the output, the Test folder on both providers has the same content. This is how you copy files between two cloud providers using Rclone.
If you want to keep the Test folder in sync on both providers, just replace the
rclone copy command with
$ rclone sync mygdrive:Test mydropbox:Test
Useful Rclone Options
Rclone has so many options. A few important Rclone flags that can be used in this scenario are;
--dry-run: It is always recommended to do a trial run before transferring the files. The
--dry-runoption will show you which files will be copied to where, without copying anything. The dry-run flag is useful to verify you're not overwriting any files accidentally.
--update: Skip files that are newer on the destination.
--transfers: Number of file transfers to run in parallel. By default, Rclone will perform 4 file transfers in parallel.
--retries: Number of times to retry failed operations. The default value is 3.
--progress- Show progress bar while transferring files.
Let us put all these flags in our command.
$ rclone copy --update --dry-run --transfers 10 --retries 5 -P mygdrive:Test mydropbox:Test
Please note that we used
--dry-run flag in the above command, so it will not transfer files. It will only do the trial run. If everything went OK as the you wanted, you can start the actual file transfer process without
--dry-run like below:
$ rclone copy --update --transfers 10 --retries 5 -P mygdrive:Test mydropbox:Test
You can also create an alias to the above Rclone command or put it in a script to save a few key strokes. Just call the alias/script whenever you want to transfer files between the cloud providers. It is that simple!
You can try other options that suits for you and modify the above command as per your requirement. The full list of available Rclone flags are given in this link - https://rclone.org/flags/.
If you happen to transfer files often between two cloud storage, Rclone is a perfect choice. You don't have to manually download files from one provider and upload them to another. Just use Rclone with suitable flags and it will take care of the rest.