How To Backup My Personal Computer Running Linux?

1 minute read

Published:

Did you think if your computer break today? Today? Yes, now! Are your important files safe? If the answer was not, Cheer up! This article will help you with this.

During the week I was researching current ways to backup my things. I found Google Drive CLI, I thought too in Python Script or Shell Script. Well I found the perfect tool when I had a problem with Google-Drive-CLI, I was not getting to generate a token, so I check this Issue in Github. Some people mention that was with same problem, and seggested the tool named Rclone.

Ok, now We know the name of tool, why do I have to use her? In my case I’m a great admirer of the company Google, and because this I save my files in Google-Drive. The tool has compatibility with all public cloud like Dropbox, Onedrive, you can see all them in this link.

How install Rclone

I will demonstrate how you can install in Debian-like distributions, but in documentation you get information of how install in MacOS, FreeBSD, and Redhat-like.

First you’ll need to install curl, use the command below for to do this.

sudo apt-get install curl

Once curl has been installed, install now the rclone:

curl https://rclone.org/install.sh | sudo bash

Configuring rclone connection with my Google Drive

There are a lot of questions in the configuration process. If you use other cloud like Dropbox, Onedrive, read with attention the topics.

  • Run rclone config in your terminal.
$ n
$ google-drive
$ 13 #in my case the Google Drive is this number.
$ Press Enter
$ Press Enter
$ 1
$ Press Enter
$ Press Enter
$ n
$ y #Here your browser will be open
$ n
$ y
$ q

This is sequence that I used, I read in the documentation of Rclone-Google-Drive.

Backing up

rclone copy --update --verbose --stats 1s "source" "google-drive:Folder-Destination-inside-Google-Drive"

You can create a Shell Script and put in Crontab for to do every day, be creative!

I hope I helped you :)

References