Recommended method to backup Budgie, personal apps, settings but no personal media

I understand Deja-Dup can backup my /home folder, but that folder could contain hundreds of GBs of photos, videos, documents etc that I already backup in different ways.

What is the recommended way to easily restore my system if I messed up the system too much?
I believe there can be 2 approaches:

  1. create an image of the drive (periodically) and exclude folders like Home/Documents, Home/Pictures, Home/Video, Home/Music (which means all other /Home/… folders and files, required for applications and also the appimages and dockers will be backupped).

  2. only backup everything that customised the default UB install: /Home (excluding personal media folders) but perhaps also /usr and some other folders?

What would be the recommended approach and is there a default tool?

Ideally, during system boot, you would want the ability to hit an F button and get the option to restore.
Or simply do a clean install with a USB drive and install some application that will restore everything you backupped with approach 2 (although I am scared I might miss something and will need to spend time reconfiguring/personalising the system).

I don’t think you’ll get far with that approach. Linux in general places files in directories to avoid duplicates. That also means a user is not likely to be able to backup system related settings easily.

Ideally, during system boot, you would want the ability to hit an F button and get the option to restore.

And here we will have an issue. That is not going to work if you did not install the related software yourself. And is likely to be a show stopper: restoring settings with values that are invalid (like a theme or icon set you manually installed) … is going to be a problem.

I would advice to do this differently: learn to set settings through command line. ANYTHING you set through the desktop has an equivalent command line method. And save all those commands into a text file. That includes all the “apt” commands.

Your dconf settings can be adjusted command line with gsettings. 2 examples:

gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action 'nothing'

( see )

I have a script that I use post install to install all the software I need. And that one also has all the gsettings commands to set dconf.

ah found it: here is an old version of that script:

1 Like

Thanks a lot. That sounds like the solution I will use on a long term as it will take time to figure out everything I have configured and find the right command.

For now, an image of the entire partition or drive, excluding only the media folders that contain actual photos/documents/videos seems like the best way to create a backup now. Is there any application that can do that, adding a line to Grub for me to restore?

I figured it out. This is the easiest and quickest way to create a systembackup. It will create a backup of your whole system, excluding folders/files that are created at boot or personal files.

Just for reference:

to backup
rsync -aAXSH --info=progress2 --exclude={"/swapfile","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found/*","/home/*/.thumbnails/*","/home/*/.cache/mozilla/*","/home/*/.cache/chromium/*","/home/*/.local/share/Trash/*","/home/*/.gvfs/*","/home/*/storage/*","/home/*/storage-safe/*","/home/*/Documents/*","/home/*/Downloads/*","/home/*/Pictures/*","/home/*/Music/*","/home/*/Desktop/*","/home/*/Templates/*","/home/*/Videos/*"} / /media/localbackup/20200314

to restore
rsync -aAXSH --info=progress2 --exclude={"/swapfile","/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found/*","/home/*/.thumbnails/*","/home/*/.cache/mozilla/*","/home/*/.cache/chromium/*","/home/*/.local/share/Trash/*","/home/*/.gvfs/*","/home/*/storage/*","/home/*/storage-safe/*","/home/*/Documents/*","/home/*/Downloads/*","/home/*/Pictures/*","/home/*/Music/*","/home/*/Desktop/*","/home/*/Templates/*","/home/*/Videos/*"} /media/localbackup/20200314 /

This type of backup is essential to have in case of a hardware crash of your SSD. O
Or buy a new SSD, install it and run the restore command. Change /etc/fstab and you should be good to go after doing something with grub (I am still a noob here).

Snapshots (for example by using BTRFS) are still essential in case you mess up your system yourself :slight_smile: I am definitely switching to BTRFS the next time I start fresh.