RClone: Tool for accessing your cloud via CLI

Most of the Linux servers that I setup and/or maintain I typically run in CLI (command line interface) mode and don’t even bother to install a GUI just to preserve disk space, memory usage and CPU usage. However, it can be a pain to access my cloud storage services. Then a few years ago, I discovered RClone. RClone lets you perform basic file and directory functions such as copy, move, delete and sync. I primarily use my Google Drive but RClone supports:

  • Google Drive
  • Dropbox
  • OpenStack Swift
  • Amazon S3
  • Google Cloud Storage
  • Amazon Drive
  • OneDrive
  • Hubic
  • Backblaze B2
  • Yandex Disk
  • SFTP
  • FTP
  • HTTP

One of the reasons why I love RClone is how simple it is to use:

  • Download it from http://rclone.org/downloads
  • Extract it using tar -xvf rclone*
  • Run it for the first time using ./rclone config
  • It will then prompt you for the connection type, I choose 8 for Google Drive
  • Then it will prompt you to name the connection. I keep it simple by just naming mine “g”
  • It will then ask you to authenticate
  • Confirm your settings and you’re done

Now to use it, for example to copy a file to your cloud storage, just use:

/path/to/rclone/rclone copy localfile (name of your storage):/

In my case:

/home/pi/rclone/rclone copy myfile.ext g:/

Google Drive Backup

It still amazes me that this day in age, that you need to remind people to backup their computers, or more commonly, try to convince people that backing up your important files once every six months to a flash drive or external hard drive isn’t exactly the best strategy. Now, you definitely have no excuse. Earlier this month Google released their new desktop client for Google Drive. The most important feature that it added that the client lacked before was the ability to automatically and continuously backup files on your desktop, documents folder, etc. Just download once, set it and forget it, the client does the rest. Best of all, every Gmail user already has 15 gb free! It’s not much but it’s plenty enough to backup impo documents and such.

Even if you already have backups, why not just add one more layer on top of it for extra protection? Go download the Google Drive client for Mac or PC and get it setup and enjoy peace of mind.

OwnCloud: An open source, self-hosted Dropbox alternative

Sometime last year right around the time that Dropbox had their database of user accounts and passwords compromised, a client of mine got wind of the story and asked me to remove all of their cloud services to on-premise servers. At the time, I was using Dropbox Plus to keep their network drive in sync between their multiple business locations (quite honestly because it just worked and it was one last thing that I had to worry about managing) so I began researching open source, self hosted alternatives to Dropbox. I quickly came across OwnCloud which is exactly what I was looking for. OwnCloud runs on top of your existing LAMP stack and has a web client, desktop sync clients as well as mobile clients for both iOS and Android. Best of all, it has file versioning built in. You can also use the EFF’s LetsEncrypt to secure the data in transit using SSL.

Ever since discovering it, I've also ran my own personal OwnCloud server using a Raspberry Pi and a one terabyte external hard drive. Of course, with any self hosted service, you get the responsibility of backing it up. I don't keep anything mission critical on my OwnCloud but I wrote a simple Python script to copy over all of the data, dump the MariaDB database, tar it into an archive, send it through an encryption process and send it up to my Google Drive once a week.

Even if you don't have a business, having your own personal cloud storage is still a fun project to do. For less than $99 (the cost for 1 year of Dropbox Pro), you can go on Amazon and order yourself a cheap Raspberry Pi kit as well as a 1 terabyte USB external hard drive and build your own personal cloud storage!

Amazon Cloud Drive to Google Drive

So I've used Amazon Cloud Drive as my primary online service provider for the last few years. How could I not? I mean, it was $60/year for unlimited storage. Over the past few years I've managed to store 4.6 terabytes of data on their cloud drive. Backups, movies, pictures, music, you name it and I probably had it stored in there. So you can imagine my disappointment when I logged into my account a couple of months ago and it said that my plan was changing from unlimited storage for $60/year to 5 terabytes for $299/year. And worse, I only had a month before my unlimited plan ended so I only had a month to find my data a new home. I lost faith in on premise external drives back in college when I dropped the external hard drive that contained my 200 gb of music and lost it all.

I took about a week researching and researching different online storage providers. The biggest problem I had was all of the reputable companies that I knew that would be around years from now, all maxed out at 1 terabyte. I finally gave up and decided just to upgrade my G-Suite Basic account ($5/user/month) to G-Suite Business ($10/user/month) so I could utilize the one terabyte storage in Google Drive and just move over the priority files.

How G-Suite Business accounts are supposed to work is that for accounts that have less than 5 users, each user is supposed to be limited to 1 terabyte per user and for accounts that have more than 5 users, each user gets unlimited storage.

I only have one user under my account (myself) so I was baffled when I went under my storage settings and it said that I had unlimited storage. So I decided to test it. I launched a Google Compute instance and started to transfer all of my data from Amazon Cloud Drive to Google Drive using Syncovory (so I could transfer 10 different files concurrently versus one at a time) and was able to transfer it all within a couple days.

Two months later, still no issues. So if you are looking to store large amounts of data, give G-Suite Business a look.