How to backup data to an external HDD in Linux?

Hey,
I have a couple of GBs of data on my PC’s internal hard drive that I regularly work on that are important to me and I would like to have a recent backup of them. For now I don’t want to use a cloud backup solution and I want to have them backed up to an external HDD/SSD that I will keep on my desk. These are the main reasons I want to protect my data:

  • Accidental deletion through something like unintended Shift + Del
  • Accidental deletion through something like unintended formatting of that hard drive
  • If I work on a document and delete some information inside it and then I accidentally save it I would like to restore a previous version
  • My hard drives are not the newest so if they fail I want to make sure I have a backup of my most important stuff
  • Pipe breaks, minor floods etc.

I don’t need to backup my whole HDD only a few folders that contain the business data. I am thinking that it’s probably a good idea to have two different versions of each document for example a recent backup (since last close or something like that) and a week-old one in case I want to restore something that I deleted previously.

Can you tell me how can I set all this up please?

Thanks.

Not sure about the automation part of the backup in Windows, but as for a backup tool that can ‘version’ files and arbitrarily backup only certain directories, I suggest restic. Its command line driven and extremely flexible.

https://restic.net/

I use Duplicity. It is mainly used for pointing backups at remote systems, but you should be able to backup to a local drive as well.

1 Like

If you’re using Ubuntu, Déjà Dup is the default backup program. I use it myself, dead easy to use.

It has an gui if you aren’t that well versed with the terminal.

my solution is to make BTRFS snapshots and export the resulting file. as well as rsync the subvolume just to be redundant.