The importance of having a Backup and some tools to carry them out

Two days ago I lost a lot of important data that I had on the laptop's hard drive. Yesterday, I lost an important part of my emails. Why? For not having a backup responsible for my data.

It all started when updating ArchLinux, one of the updated packages conflicted with the rest and when restarting I could not access my session, in fact, I did not start the X.

As I already mentioned, the solution that they offered me in the ArchLinux was to reinstall the System, so I started to do it. Disgruntled, grumpy, and in a hurry, I didn't notice the order of my partitions and ended up SWAPing my Data (/ home) partition.

Everything happened in a second. Luckily, a few days ago I had made an exact copy of my data on an external disk and I was able to recover a large part of my stuff.

But the folders you use KMail to store my messages they were not copied well, something that I cannot explain because I am 100% sure that the Rsync was executed correctly.

End of story: I lost many important files and thousands of emails. Why? Due to human error, but mainly due to not having made a Backup of my data.

How to avoid this?

Of course, because the only way to lose data is to have a backup and of course, for this we must have the necessary resources, be it hardware (HDDs, Flash Memories, DVDs), such as the Internet if we want to trust the Cloud.

If we do not have the means to make our saves, then we are exposed to a fatality. But OK, let's say we have the resources. How do we make our saves?

Performing the saves

En GNU / Linux We have a lot of applications to create Backups of our files. Let's see some variants and alternatives.

Rsync

This tool would be the most effective method to carry out our saves, mainly because of its power and because it is installed in most of the distributions GNU / Linux.

But beware! If not used correctly, the remedy could be worse than the disease. The two examples that I show below, although they look the same: THEY ARE NOT.

$ rsync -av / folder / source / folder / destination $ rsync -av / folder / source / / folder / destination

A bar can change our lives. In the first case, it will copy the folder the origin inside the folder destination, but in the second case, will copy the content Folder the origin, inside the folder destination.

To avoid mistakes, I always copy entire directories. For example, my / home folder.

$ rsync -av --progress /home/elav/ /run/media/elav/HDD/Salva/elav/

If we have a server that we can access via SSH, we can use something like this:

$ rsync -av --progress /home/elav/ usuario@servidor:/home/elav/

We only have to assign in the Cron every time we want to save our files. The good thing about Rsync is that, unless we tell it otherwise, it will not copy the files that are the same because it looks at the date and their size.

Graphical tools

Sure, there will always be someone who wants something more graphic. Linux Mint has to MintBackup, its own tool to save our data.

Ubuntu It also has its tool to do this type of task (I think it is Deja-Dup) and we have applications such as Bacula, if we want to back up our data on the network.

Other interesting tools can be BackupPC y Let-dup:

BackupPC

BackupPC

DejaDup

DejaDup

In short, there are many others, it is only a matter of choosing the one we need. Do you use any of these? Or what is more important, do they save your data?


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

37 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Yoyo said

    Good post

    In my case I do not need it, my use of the system is extremely simple, all my data, usually music, videos, documents, images, I save them in / media / Data

    I never use / home to save anything so I don't make it apart.

    I don't use email readers, I go to email via browser, I don't use RSS readers, the same, I go to my blogroll one by one via browser etc etc

    If one day the / root is seen going for whatever reason, I really have nothing to lose beyond the system itself, but never personal data.

    Regards!

    1.    elav said

      Thanks compa. But one detail, what if the HDD breaks? Not only is a Backup made to save the / home partition, but the entire HDD 😀

    2.    jamin-samuel said

      The best way to have the data secure is to partition that way but, / media / data still feels part of the root xD ahaha

      Of course it is just a mount point that one assigns but it is not a big deal 😛

      1.    anonymous said

        For my part, I have my data on an encrypted external hard drive, in this way no one can access my data, and on the PC I have the new folder that I then transfer to the external dd when I have time. So I access my files from the pc, laptop or any device without occupying the internet, cloud, pcs, etc.

        Data on how to encrypt the external dd:

        http://www.taringa.net/posts/linux/16767633/Centralizar-todos-tus-archivos-un-disco-externo-encriptado.html

        What remains for me is to have another external dd in case one fails.

    3.    AlonsoSanti14 said

      Very successful your comments @elav, already once I happened with an HDD and lost all my data

  2.   Staff said

    For those who like a GUI, this freeFileSync, very powerful and with options such as bidirectional enthronement, or choosing which files not to synchronize, among others.

  3.   goidor said

    The other option is to create your own server in the cloud by downloading Owncloud. http://owncloud.org/

  4.   HerrMovi said

    There is a graphical interface for rsync called grsync, for those allergic to the console or for simple convenience.

    1.    elav said

      So is. Thank you for providing the information.

  5.   ac_2092 said

    Very good post!
    It is always important to make backups to our data.
    If you have accidentally deleted data or partitions and you want to recover them, you can use Photorec to recover files or Testdisk to recover deleted partitions. Both applications are very effective and can be found in the repositories.
    Greetings.

    1.    elav said

      Yep, I know them, what happens is that Photorec recovers things with strange names, everything messy and when you lose 250GB of information, everything becomes a bit difficult hahaha.

      Thanks for stopping by.

  6.   pedro said

    Is there an application that is like the one with windows to return the system to a previous state?

  7.   Cocolio said

    "It all started when when updating ArchLinux, one of the updated packages conflicted with the rest and when restarting I couldn't access my session" That's the reason why I hate Linux on the desktop, that and well the "quality" of controllers to be passed are those of the manufacturers.

    But for now it is best to always make backup copies of the data since any system, whether hardware or software is prone to failures, I would also suggest a tool called BitTorrent Sync that works even with mobile devices, and something important since these are put to much use.

    a greeting

  8.   Outdated said

    Rsync is a very good program, although I still don't get on with it. It also has a graphical interface that is grsync (although I don't understand it either, I don't trust it yet).

    The program I use to back up my data is Unison (with its unison-gtk graphical interface). I recommend it as it is very intuitive. The first time it is used it takes a long time to check everything, but in subsequent uses it is as fast as rsync.

    Greetings.

  9.   Bones said

    "The only way to lose data is to have a backup" ... Hello?
    (Someone tell me how to make quotes in the comments, thanks)

  10.   aragorn said

    Sometimes the same thing happened to me (I installed a package in debian and when restarting it panicked), but it was just a matter of entering with a livecd and chrooting to the debian system, configuring the network, uninstalling the rogue package, installing the old one and voila, when I restart I start without problems.

    I think your first mistake was to reinstall hahaha (the second one obviously formatted home XD), so you know for the next one, reinstall or that we were in the cave times with win2 = P Although you are right about the importance of backups.

  11.   manuti said

    Well, I've been with Back in time since 2009 http://backintime.le-web.org/ that uses rsync and hard links with a simple graphical environment but with power in the style of Apple's Time Machine.

  12.   Akira kazama said

    Not long ago I needed a tool like this, not to make a backup but because I wanted to move my data to another hard drive, I tried with MintBackup and Grsync but both failed with the task, MintBackup always hung when trying to copy a certain file to a folder hidden, and Grsync was so slow that I don't even know for sure if it had hung or was still working, because although I observed activity on the hard disk the process did not progress for hours. Finally I resorted to a simple "cp" that copied all the files respecting dates and attributes as well as completing it in less than an hour.

    Since then I forget about graphic tools if complicated and important work.

  13.   AurosZx said

    Thanks for the post, I needed it 🙂 I guess the command (combined with ssh) could be added to the cron. Is there a way for me to recognize changes in a directory and then back it up? Would be the best.

  14.   Joaquin said

    Good date.
    I don't use any backup tool, I just copy entire folders and if later I see that I no longer need some things or the disk is full, I delete them. I have some copies on two disks and on different partitions of each.

  15.   Ruben said

    After a virus that loaded my Windows (when I was using it) I learned my lesson and since then all my files are on an external hard drive.

    Now that I am on Linux and have become "fond" of formatting and reinstalling, I use the external hard drive more often: as all the new files that I download go to the Downloads folder, when I see it very full I transfer the files to the external hard drive . This way, you would only lose the most recent files in case your computer's hard drive crashes.

    Although the external hard drive can also be damaged and then it does kill me 😉

  16.   darkar said

    Good post

    The truth is, I had never realized how important it is to have a backup of all your data or at least the most important ones.

  17.   Ale said

    Elav, try: # rsync -arvz

    Greetings,

  18.   nocturnal said

    Déjà Dup has been using it for years. I also leave encrypted backups if I consider it so.

    I always leave a / home partition. Reading the article I see an accumulation of unforeseen and too improbable errors. Nor does it cost to make even paper copies, more than anything the public administration is still analog.

  19.   Charly said

    To recover lost files in linux (even if a partition has been formatted): http://www.cgsecurity.org/wiki/PhotoRec_ES.

    A good backup system, in graphical mode and based on rsyn and that, in addition, is in the repositories of most distributions: http://luckybackup.sourceforge.net/

  20.   Rainbow_fly said

    It comes from pearls since today I intend to buy a new Notebook and discard the old one. But can't we just cp the files we have on the system to a hard disk? Is it really necessary to use specific backup tools?

    1.    elav said

      Of course you can use CP, but to make "safe" copies it is advisable to use Rsync because of the various options it offers.

  21.   Toyerd24 said

    Who here trust cloud services? 🙂 Greetings.

  22.   Ds23yTube said

    Very good Tutorial, simple but effective. Now that I have bought a 1TB external HDD, I can do some other Backup of my home.

  23.   Lolo said

    It's not trolling but how the hell do you get a daily security copy from a 1Tb disk ???

  24.   jony127 said

    Hello,

    I have been testing several applications for a long time to automate my backups. I do not copy the complete home page but I add the folders and files that I need to copy as well as exclude some other, for all this I use backintime a graphical interface for rsync that works well and you can easily and intuitively make your backups, try it.

    Greetings.

  25.   Fedorian said

    Well, if the system is screwed I start in livecd and I get what I have to get. Another thing would be if the HDD is screwed, luckily I have almost everything of importance in Dropbox, the most I would lose would be the pr0n

    1.    Ale said

      The most important thing in Dropbox? Oo

      1.    Karlisle said

        Hehehehe well, let's hope the partner has at least encrypted it before uploading it 😀

  26.   gonzalezmd (# Bik'it Bolom #) said

    Thanks for the reminder and for recommending a solution. Regards.

  27.   Nebuchadnezzar said

    To avoid these little programs, the best, most complete and interesting thing is to install in a raid1; I do it like that with all my debian or arch, and apart I put cryptography and LVM. It's very easy to do, I highly recommend it.