What is Rclone?

Rclone is a cross-platform terminal-based application that allows you to manage cloud storage services from virtually any machine, regardless of which OS you’re running. I really like it because it offers a TON of functionality and compatibility with loads of different services from Amazon, Google, Box, Dropbox, and more.

Some may be intimidated by the fact that this program doesn’t have a front end and is only usable inside the terminal or command line. However, if you’re familiar with just the most entry-level basics of how the terminal works, then this program shouldn’t be that difficult for anyone to use. After all, the main purpose of the program is just to move files around to different places. How hard could it be?

The Basics

In my admittedly limited experience with Rclone, I’ve used it pretty much exclusively with Backblaze. Once you download and install Rclone to your machine of choice (I’ve never seen so many operating systems supported!), you can get a brief overview of what Rclone is and how it works just by running this on a Mac or Linux:

man rclone

That will pull up the manual for the program. Also, I just learned in Windows, you can type the name of any command (in our case, rclone), followed by a forward slash and a question mark to bring up the manual page for that command in the windows command prompt. Like this:

rclone /?

Configuring Rclone

Next, you’ll want to set up rclone with whatever service you want to use. To do this, you can run:

rcone config

This will bring up the configuration options for rclone.

In the above example, you can see that I’ve already set up rclone to run with my Backblaze account. Any configured accounts will appear at the top when you run:

rclone config

At this point, you can run through the prompts to set up a new account by selecting your service from the WIDE list of compatible services, entering your account login credentials, and you’re good to go!

Basic Commands

Once you’ve got rclone configured to use basically any and every service you like, you’re ready to start transferring files! The basic syntax can be found in the manual page either online or in the terminal using commands mentioned above. Here’s how it works:

In the manual page, the syntax is listed like so:

[options] subcommand [parameters] [parameters]

Kinda clear, but also kinda confusing. Luckily, there are a few examples listed immediately after the generic syntax format:

rclone ls remote:path # lists a remote repository
rclone copy /local/path remote:path # copies /local/path to the remote
rclone sync /local/path remote:path # syncs /local/path to the remote

It took me a few tries to figure it out, but when you’re configure your storage service (Amazon, Google, etc) it prompts you to give it a name. You can name it Google or anything you want. Just be aware that rclone is case sensitive when it comes to remote names. So if you configure rlcone and name your remote BackBlaze, typing backblaze or Backblaze will not work.

Let’s say you want to copy fluffykitty.jpg to the kitties folder on your Dropbox account. You’ve configured rclone and named your Dropbox configuration boxlyfe. So with that in mind, first you type rclone to call the program. Then you type a subcommand. What do you want to do with rclone? Copy files, so type copy. Copy what? Type the file path to the file or directory you want to copy. Copy to where? Type the name of the remote (boxlyfe), colon, and the directory you want to put it in. So your command will look something like this:

rclone copy ~/Desktop/fluffykitty.jpg boxlyfe:kittypix/ --dry-run

The –dry-ryn flag at the end will test the command without copying anything. That way you can correct any typos in your command before actually executing it. Once everything looks good, you can replace –dry-run with –verbose to get text output updating your on the progress of your upload.

rclone copy works with individual files as well as directories and all directory copies are recursive by default, meaning rclone will grab EVERYTHING inside that folder, and all subfolders. Also, you can reverse the copy command to download stuff as well. Wanna get that kitty picture back? Just run:

rclone copy boxylyfe:kittypix/fluffykitty.jpg ~/Downloads/ --verbose

Thats it! Back up your files from anywhere with this fancy CLI tool! Also, the official github page


0 Comments

Questions? Feedback? Let me know! Drop a comment below: