Hi! A friend just recommended the backup tool that comes with Ubuntu. I took a look at it and was wondering what you guys include and exclude from the backups. I just installed wire guard VPN and but the config file in the etc/wireguard folder, where it belongs. I would have to include this folder as well if I want to keep my configs. And I guess many programs do the same, so how do you know what to include, so you can just revert to the last backup if something breaks or you get a new machine? Maybe that is a stupid question, but it was going through my head for some time now. Thanks a lot!

  • atzanteol@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    My philosophy is “anything I can’t reproduce easily”. This will vary depending on the machine and data. But it’s been a good guide so far.

  • lurch (he/him)@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    the most important thing is your user files. everything else just speeds up recovery.

    you should keep a bootable recovery medium around, like an installer USB, so you don’t have to bother your neighbours for one at 2 in the morning…

    to restore faster, you either make disk images (can restore everything quickly in one go) or save partiton layouts, configs and package selections as well as everything you installed without package management. if you don’t do this second part, you have to sit through a reinstall and figure out everything again and that sucks if you don’t have time. like you really need to open that document, but you forgot the name of the program you use to edit it etc…

    if you use just one large file system, you can tar everything up, using --one-file-system , so it skips stuff like the inside of mounted snap packages, which also are present in another place. on restore you then have to format untar and install a boot loader. beware that EFI boot can be difficult to set up and has another partition. so this is just for pros. however, this enables to use tar features like differential backups.

  • limelight79@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Data and configurations.

    If you have the space, software is nice because it’s easier to get the system going again, but the data (your files - music, documents, pictures) and system configuration files (/etc for example) are the most critical. If you have databases set up, learn about their dump commands and add that.

    You don’t have to use the same method for everything. My pictures are backed up to another side in a second computer and to Amazon Glacier for $2/month (I’ll have to pay to download them if I ever need it, but I’ll gladly pay if I’m in that situation - those should only be needed if I have a major house fire or something like that). My weekly backups are my /home directories, /etc, /root, a database dump, and maybe one or two other important things.

    • kevincox@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Really configuration is best not backed up but created from some source of truth like a Git repo. But a backup can serve as a poor-man’s version control.

  • UnfortunateShort@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    I auto-backup my entire /home, except for stuff I explicitly exclude and hidden files. I only explicitly include some of the latter, because I don’t want to back up all the stuff programs put there without my knowledge.

    Config files outside of /home I copy semi-manually to and from a dedicated dir in which I replicate exactly where they go in my actual FS. I have written shell functions that easily allow me to backup and restore stuff from there and it’s synced to my cloud storage.

  • Tick Dracy@lemm.ee
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Hijacking this topic, I use this software on Windows, which does incremental backups of the system (including the OS, alongside documents, downloads, etc). It can also be easily restored by booting a custom image from an USB and restore the image created.

    Is there anything like this with Linux?