Hello, I have a bunch of personal data - videos, pictures, documents, PDFs etc. that I want to backup.

I am wondering what is the best way to do this?

Requirements -

  • I want to backup multiple different folders from my Linux computer - it is not a full disk backup.
  • Encryption would be great to have.
  • This needs to be a long term backup - like few years or more.
  • Data - small videos, pictures, PDFs, text files, documents, etc. Total size - less than 50-60 GB (for now - but it can increase over time).
  • I want to be able to incrementally add more data to backup of respective folders (e.g. new photos, documents etc.), or even add new folders.
  • After backup, I want to be able to cleanup my hard disk, reinstall OS or restore data from backup onto a completely new system in a new directory.
  • I do not care about stuff like file metadata like owner user, permissions etc.

Questions -

  1. Is one or more flash drives good for such kind of backup? Or would it get corrupt within few years?
  2. I found Borg backup, but it suggests that backup should be restored on the same machine - which does not seem to fit my use case.
  • It also suggests to keep Borg config directory - which again conflicts with restoring or adding new items from a different system.
  • Not sure how well this would work if restoring on a new system?
  • Are there any better alternatives?
  1. If I do use Borg, should using one repository per folder be the way to go about it? Or is there a better way?
  2. In Borg itself, I am thinking of using the repokey method (key stored with the repository) - and store the passphrase in a KeePass database on a different flash drive. Any different suggestions?

Please feel free to suggest any alternatives or improvements to my plan?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 month ago*

not sure if encrypting backed up data using luks would allow incremental addition later on.

It does, luks just adds an extra command for mounting the drive, after that it's a normal mounted filesystem where you can add, delete, edit as you see fit.

Here is a sensible guide to setting up an external drive with luks: https://comfy.guide/client/luks/

Here's a resource that explains rsync's exclude option and many of the core workings of rsync: https://linuxvox.com/blog/using-rsync-filter-to-include-exclude-files/

Have an example from my own backup script:

sudo cryptsetup luksOpen /dev/sdd backup
sudo mount /dev/mapper/backup BACKUP

time rsync --archive --progress --delete \  
    --filter="protect /VAULT_GO" \  
    --exclude=/.VAULT_GO-01_encrypted \
    --exclude=/.VAULT_GO-02-nobackup_encrypted \
    --exclude=/Movies \
    --exclude=/Games \
    ~/DATA_DRIVE/ ~/BACKUP/

Here's a resource that helped me refresh what rsync's "filter" option does: https://superuser.com/questions/161766/how-to-exclude-rsync-excludes-from-delete. TBH I need to look into that more, it's been a long while since I wrote that script and there's probably more things you can do with the filter option.

  • source
  • parent