Hello there! Here’s the thing: I got some old HDD for my Debian home server, and now that I have plenty of disk space I want to keep a backup of the OS, so that if something accidentally breaks (either SW or HW) I can quickly fix it.

now the question is: which directory should I include and which should I exclude from the backup? I use docker a lot, is there any docker-specific directory that I should back up?

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 day ago

    I think most options have been covered here, but I’d like to consider some other bits…

    User accounts & file permissions:- if you have >1 account, note that the UserID is internally numbered (starting from 1000, so Bob=1000, Sue=1001) and your file system is probably setup using the numerical UserID… so re-creating the users in a different order would give Sue access to Bob’s files and vice versa.

    Similarly, backing up /etc /var etc… you should check if any applications (ie databases) need specific chmod and chown settings

    Rsync, tar, etc can cover some of this, you just need to check you rebuild users in the correct order.

    Maybe Ansible is another approach? So your disaster recovery would be:

    1. Install plain OS on new drive
    2. Get Ansible access to it (ie basic netwroking)
    3. Rebuild OS and instsll applicstions automatically with Ansible
    4. Restore application & home folders (again with Ansible)

    When you get this working, it’s amazing to watch an entire system being rebuilt