Announcement

Collapse
No announcement yet.

How to backup system settings

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to backup system settings

    Hi guys! Can someone please tell me a method to back up the entire system (including every single program setting)? I’ve been using BackInTime to back up files and folders. Thanks a lot.

    #2
    From your $HOME folder,
    cp -rf ./.[^.]* /some/backup/place/
    will copy all files and folders beginning with a dot to said place. Which should do it - for system settings.

    The reason you have to use ./.[^.]* is that in Linux shell, the current directory is called ./ and the one above it, ../, so if you just copy .*, it will... make a mess :·)

    BackinTime will make a backup of everything including those, though.
    I like TimeShift better actually. It does BTRfs-like "snapshots" - without BTRfs.
    Last edited by Don B. Cilly; Jul 03, 2020, 12:34 AM.

    Comment


      #3
      If you want to backup everything, use rsync, or rsync with one of its GUI applications.
      The next brick house on the left
      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



      Comment


        #4
        I used to do that. I just got a bit tired of all the screen output.
        To start with, I had to use
        rsync -a --exclude '/media' --exclude '/opt' --exclude '/proc' --exclude '/dev' --exclude '/sys' --exclude '/run' / /media/not/SD2/Backup/
        and such. Having to exclude /media I found a bit... I mean come on. If you don't, it goes into a loop and copies the backup to the backup :·/

        And even with that, it was just pages and pages of errors and warnings.
        And having to repeat the --exclude instruction... clever programming I guess. You also have to do that in the GUI (Grsync). With text :·/

        Timeshift uses rsync (when not using BTRfs) anyway.

        Comment


          #5
          I've used BTRFS since 16.04 and I've tried snapper, TimeShift and several terminal commands, including tar, to back up. Absolutely NOTHING matches BTRFS snapshots and rollback for ease of use and speed. Snapshots in mere seconds, not agonizing file-by-file copying in the background slowing down your system while you try to do stuff in the foreground.

          The complaint I have about TimeShift and snapper is that they store the snapshots inside the system they are backing up.

          If one opens a Konsole with "sudo -i" and then mounts the running system to /mnt
          mount /dev/disk/by-uuid/ce2b5741-c01e-4b3d-b6ba-401ad7f7fcdf /mnt
          NEVER using /dev/sdx but using uuid's instead.
          Then one can make a snapshots directory, "mkdir /mnt/snapshots" and store the snapshots they make in that directory.
          btrfs su snapshot -r /mnt/@ /mnt/snapshots/@20200629
          sync
          btrfs su snapshot -r /mnt/@home /mnt/snapshots/@home20200629
          sync
          umount /mnt
          exit
          exit

          The snapshots take about 1 second each. I capture from bash history the previous command and modify the date to create the new command. From mounting to creating the two snapshots takes less than a minute.

          The BTRFS forum has a description of how to do these processes, how to send a snapshot pair to a remote device, and how to restore from a previous snapshot.

          I do all of this manually because it is easy and quick, and nothing runs in the background for an hour or more.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            To be fair (to Timeshift) the rsync snapshotting (snapshooting? ;·) does take a few minutes, but it doesn't really slow down the system much at all.
            I have a CPUsage, memory and disk I/O monitor on all the time, and the impact is minimal. I can do just about anything with no performance loss while it does it.

            And, it stores the snapshots inside the system... temporarily. In /mnt/timeshift/backup.
            After the backup is done (in my case to an external USB HD) that place is empty again.

            Comment


              #7
              I'm not concerned about system response, I'm concerned about the sum of time it takes to run a point in time full backup of the OS, at some defined frequency, over some period of time. Versus a simple clean install.

              I can hear the boos and hisses already.

              For the way that I manage my system, the way my system is configured, and for what my system is used - it's a no brainer, clean install wins every time. My content, my data, my files are far more dynamic, far more valuable, and far more difficult to reconstruct than the OS (always LTS) that I use. Thus I spend downtime on data backup, and not on OS.

              That may not be "your" (generic anyone) experience, thus my offer of plain Jane rsync, and it's your choice. Always answer the who, what, where, when, and why questions; that always leads you to the correct "how" answer.
              The next brick house on the left
              Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



              Comment

              Working...
              X