• [deleted]

This might be an easy question for some but im not one of those so i thought i would ask the Solus community on what you backup and if you have some nice beginners advice?

For reference I found a guide that i have quoted to start things of: https://unix.stackexchange.com/questions/1067/what-directories-do-i-need-to-back-up

/home/ for user data and configuration.
/etc/ for system wide configuration files.
/var/ contains a mix of directories you usually want to backup and those you don't want to backup. See below for a more detailed explanation.

Some more directories to consider are:

/usr/local/ hand-installed packages (i.e. not installed through apt) are installed here. If you have packages installed here, you may want to backup the whole directory, so you don't have to reinstall them. If the packages themselves aren't important to you, it should be enough to backup /usr/local/etc/ and /usr/local/src/.
/opt/ if you didn't store anything here, you don't need to back it up. If you stored something here, you are in the best position to decide, if you want to back it up.
/srv/ much like /opt/, but is by convention more likely to contain data you actually want to backup.
/root/ stores configuration for the root user. If that is important to you, you should back it up.

/var/

/var/ contains many files you want to backup under most circumstances, but also some you don't want to backup.

You probably want to backup these:

/var/lib/ this directory contains lots of data you want to keep, but also some you might not. Backing it up in full leaves you on the safe side (but restoring the backup on different hardware might cause problems).
/var/mail/ you normally want to backup local mails.
/var/www/ if your web root is located here and this is the only place where your web content is stored, you want to back it up.
/var/games/ you may want to backup these, if system wide game data is important enough for you (not many games use this storage though).

You probably don't want to backup these:

/var/backups/ contains some files that are automatically backed up by Debian, you probably don't want to backup these.
/var/cache/ contrary to the name, some contents of this directory are important, so check each subdirectory individually, as a rule of thumb, everything you put here yourself is important. You also might want to backup /var/cache/debconf/.
/var/lock/ locks usually (always) don't need to be backed up.
/var/run/ contains data that is only important for your running system, i.e. when you shutdown you system, it will not be needed any more.
/var/spool/ normally important data shouldn't be stored here, but you might want to check.
/var/spool/cron/crontabs/ might contain many commands or a complex schedule, even with dependencies on other systems, that has taken considerable effort to put together.

You have to decide yourself on these:

/var/local/ you normally know if you stored something here and whether you want it on a backup or not.
/var/opt/ see /var/local/ or better check if something important is stored here.
/var/log/ depends on whether your logs are important to you and if you have enough space to store them (they might take a lot of backup space over time).

ps: im going to use Vorta (new in the repo as of today) gui for borgbackup

If you don't know, backup /home, ideally schedule a regular backup for this.

Any file you manually add/modify outside the home folder, like custom config files you add under /etc/, you can make a copy at the time you add/modify the file, since it is not something common you do often.

If you mount custom partitions with data, you will certainly want to backup these as well.

For the rest it depends on what you do.

    I use Macrium Reflect Server Edition to backup all my drives onto an external one every week or before and after a significant update.

      This is a great question (OP). I've never backed up in Linux. And I want to.

      In WindowsDaze the system's internal software did that. I'm not even sure where? A partition on the C drive?

      Berk your questions are great, I have more:
      If your OS on SDA (the proverbial 'C') gets hosed, and your backup is on that SDA, then there is no backup, correct? All down in flames? Or there is a chance the backup partition (is that what it does?) may boot?
      What is a backup? A Bootable clone of the most important parts on your OS? Or non-bootable?
      Where is the ideal place for a backup?

      Heavens, I should do my own research!

        • [deleted]

        • Edited

        Thanks for the answers!

        kyrios A little follow up: are some folders good to omit in the home folder - like .cache for example is it just bs cache files or do they contain important stuff? Are there other folders in home that are normal to omit in order to make it more efficient?

        DooshPastesh Tourette I tried Clonezilla and i guess Macrium falls under the same category? In any case i did a few images with Clonezilla when i was doing some major changes to my partitions which saved me once atleast! The problem with it is the imaging takes forever to do and your computer is useless when its running.

        brent thanks bud 😁 Nah ask away, i dont mind you filling up the thread with more questions!

          [deleted] The classical are /tmp, /run, /var/tmp, /var/log, /var/spool, /var/run, /var/lock
          Personally I don't backup /var at all, if you need stuffs under var (like for instance /var/www if you installed a web server for your developments, you know you want to backup it).

          Regarding your initial post, many things don't apply for vanilla Solus (i.e: /opt, /usr/local, /var/backups, /var/local, /var/games, /var/mail, /srv, the crontabs things, ...)

          Also I find this weird to advise to backup /var/lib there is nothing you want to keep there. You should backup your data, not applications or libraries that can be reinstalled.

            • [deleted]

            kyrios Alrighty! thats a good start!

            Talking about backup, I wonder why timeshift isn't available in Solus.

              I backup /home using restic (https://restic.net) manually about every other day. It first lands on a raspberry with an external hdd. That raspberry rsyncs everything to another raspberry in my dad's house every day and from time to time I rsync it all to an otherwise offline external hdd. That asteroid would have to be quite big to wipe out everything.

              I just do image backups of partitions and drives with clonezilla. No fuck around, not annoying, easy to do and works everytime I need it. For /home stuff simple things like rsync is enough to copy over files to a external drive or something like that.

              I always figured I could just reinstall the OS, and save my personal stuff (backup) from /home. I used to just backup documents, photos, and the like, but I now am just backing up the whole /home/<user> minus directories like .cache.
              Storage is cheap.

              Nothing. I live life on the edge.

              If I were to back up, and I should as re-doing many things is time-consuming, I'd copy my /home/justin into Dropbox (soon to be NextCloud). That's it basically.

                I make a backup of any data or configuration file I remember changing. I'll also make a backup snapshot of data or configuration files if I'm making a lot of changes. The snapshot backups are in case I mess something up and don't notice it.

                I always append the date and a sequential number, and the computer model (I use two computers) to the end of my files. That way, I know when the file was backed up and from what computer. For example:

                my--spreadsheet--file_20190504-01_xyz123.ods

                • [deleted]

                • Edited

                I settled with doing daily backups with Vorta of my home folder omitting some stuff that are easily downloaded or not important like games, spotify and browser cache! I also backup /etc/ settings i dont want to redo incase that day ever came and some folder on my windows partition.

                I backup this to my Google drive storage until i can find something that can replace that - sofar nothing has peaked my interest or wallet size! 🙂

                Thanks again all for the answers!