I'm sure at some point you have experienced the lost file upset by an accident or a failure of your hardware. Once lost data can be recovered difficult, or requires a high financial outlay for recovery. It is therefore a good idea to prevent these incidents with proper data backup system. However, having to move your data to pendrive (or cloud) can be quite tedious.

With this article I intend to show that, for me, is the best solution in Deepin OS to keep your files safe without having to worry about start moving files from one place to another. To do this, we will rely on the applications called rsync and cron rclone with which we can execute synchronization folders automatically on the date and frequency to indicate.

If you have a large hard drive is advisable to have a dedicated partition for backups only the data you want to retain. But it is still safer to have double security dump copying my data both specifies a partition for data, as my personal clouds. That is, copy your data to two different platforms, because if for some reason fails one, always have available the other. However, it is a personal decision to use both mechanisms or only one of them. In any case, I will explain both

To illustrate more clearly I'm the way I configure my computer:

Example backup system

My initial idea was to keep my PC four folders: Music, Documents, my projects and my personal library. The first folder occupied over 10 Gigabytes, my documents about 8, my projects and my library 5GB 35.

The first thing I did was plantearme distribute my data. Synchronizing with the data partition had no space problems, since I have a second hard drive with 300 GB, so spare me space. However, clouds rarely go free 50GB So, I decided to distribute backups as follows.:

  • Musica -> Google Drive con mi cuenta
  • Documentos -> Google Drive con mi cuenta
  • Proyectos -> Google Drive con mi cuenta
  • Biblioteca -> Mega con mi cuenta
Example diagram of system provides automated backup

Once that was clear as I wanted, synchronize folders with the cloud by rclone and added the necessary commands to perform the automatic saved periodically. It sounds somewhat confusing, but now I explain everything in more detail.

Settings to automatically save your data to another partition / disk:

Going to the terminal, we type sudo nano crontab -e With which we access the crontab configuration page. There add commands that synchronize the folders you want to backup, including how often you want to run
In this case we have chosen because they run every day at 7 pm. The following image is detailed in depth

Image crontab page where synchronization add our command

Cron allows you to completely customize how often you want to run a command. However, I intend that this article does not become too extensive. For those interested in knowing more about it here I leave a link where you can learn more about how to manage cron

Settings to automatically save your data in the cloud:

  • Step 1 - Configure the clouds that we will use with rclone. They can be used multiple accounts and different platforms. In my case, I use three different drive google accounts (one for my images, one for documents and the last to save my personal projects) and Mega (for my library). So I had to set the four accounts with the rclone config command. It's nothing complicated, just follow the steps in the project website Rclone
home page

The configuration generally consists of the following steps:

  1. We open a terminal and run the following command: rclone config
  2. you type n (Create new account) and click enter
  3. Asks for the name for that account adds that that you please and enter
  4. Then will offer a list of the clouds that you can configure. Choose one of them by simply typing the corresponding number and then enter
  5. From here, each platform is configured differently. Henceforth, I will continue with the steps to the most popular cloud (Google Drive). then we continue to the Drive platform and leave the empty clientID client_secret pressing enter twice in a row. For other platforms I recommend that you follow the steps outlined by the official website of Rclone (click on the icon with a book on the web belonging to the cloud you want to install).
  6. After that it asks us to choose how it syncs. Select the first mode by typing 1 and pressing enter twice
  7. Finally, press and Y enter , Which will open a browser tab to link your account, and there We accept linking

Then we repeat the process (for each platform itself, obviously) with each of the accounts you want to link to rclone.

  • 2nd Step - Just need to add commands that synchronize our folders with clouds already have configured and assign the time you want to execute the synchronized with crontab. In this case I will tell the machine to synchronize with the cloud every week, except folders Documents and Projects, which change much more frequently. Open the configuration sheet by terminal crontab sudo crontab -e and I added the following:
Sincdronización commands for files in the cloud

Ready! From now on you will not have to walk pending burn your copies, the machine will do it for you.

5 3 votes
Rate the Article
Report of
7 Reviews
More popular
Newer Older
Opinion from the article
See all comments
LeviB (@levib)
10 meses atrás

I had never thought of a salvo of this kind, good suggestion.

Eli (@eli)
10 meses atrás

It's a pretty clever way to make a backup in the cloud  Jorge Kenobi. Very well written.

TonyRevuelta (@tonyrevuelta)
10 meses atrás

Good proposal, even better if you can encrypt before boarding.

TonyRevuelta (@tonyrevuelta)
Answering to Jorge Kenobi
10 meses atrás

 Jorge Kenobi

Thanks, I'll revistar that.

RhymeDanger (@rhymedanger)
Answering to Jorge Kenobi
5 meses atrás

If you already have the / home directory encryption using the OS, it is even necessary to encrypt? I would say no, but ask opinions.

Alex Andrade
Alex Andrade (@alex-andrade-30)
6 meses atrás

Very good plan for backups, thanks for the fabulous idea!

We would like to know what you think, Join the discussion.x