We continue with this small series of tutorials on how to backup our configuration of our desktop environments, in past articles you can find the methods to support XFCE y LXDE.
Now it's the turn for the Mate desktop environment that as you know in a fork of Gnome 2 and to make the backup of Mate we must do the following.
Dfcon installation
To bakcup our Mate configuration we can do it with the help of Dconf. It is a database system that many Gnome-like desktop environments rely on to define things in the desktop environment for the user.
This tool is usually included in most Linux distributions that work with Gnome or applications of this.
In case of not having it, you can install it in the following way depending on the system they are using.
If they are users of Debian, Ubuntu, Linux Mint, Elementary OS or any system that is derived of these, they can install this tool with the following command:
sudo apt-get install dconf* -y
In the case of those who are users of Arch Linux, Manjaro, Antergos or any derived system from Arch Linux, simply run the following command:
sudo pacman -S dconf
While for those who are users of CentOS, RHEL, Fedora and derived systems of these can install the application with the following command:
sudo dnf install dconf
If you're user of any version of OpenSUSE, you simply install with the following command:
sudo zypper install dconf
Performing the bakcup of Mate
Since the Mate desktop environment has all of your data in Dconf, you will need to export the information from the database to back up your configuration.
The easiest way to make a backup One of the Mate desktop settings is forgetting to figure out which area of Dconf you need to back up specifically and instead create a general copy of it.
This is very time consuming, as the dumping process represents all that Dconf has to offer, but the benefit is that everything stored within it will be backed up.
To start the extraction process with Dconf They should open a terminal and execute the following command:
dconf dump / > ~/Desktop/dconf-full-backup
They should know they should not use the sudo or su command.
Desktop environments do not use the root user or root file system to set up a workbench, so attempting this will not be able to back up anything.
Verify that the Dconf backup works by looking at the contents of the file, using the cat command.
cat ~/Desktop/dconf-full-backup | more
Already reviewed they can save, share or whatever they have in mind to do with this backup.
An alternative to backing up everything is to tell Dconf to only export items in / org / mate, instead of everything.
In this way it will only focus specifically on the Environment settings, leaving aside the user settings.
For this we simply have to execute the following command:
dconf dump / org / mate> ~ / Desktop / dconf-mate-backup
In the same way, we can check that the bakcup was created correctly:
cat ~/Desktop/dconf-mate-backup | more
Restoring the backup
To restore the backup of your Mate desktop environment They must simply execute the following commands, it is important to emphasize that they must have Dconf installed:
dconf load / < dconf-full-backup
Restoring the desktop-only backup works the same way as the full backup.
While In the case of those who only backed up the environment, they should type:
dconf load /org/mate/ < dconf-mate-backup
Now you just have to restart your user session so that the changes that you have restored are taken over in the new installation.
Although it is recommended to perform a system reboot so that the changes are loaded correctly at the start of the system.
It would be interesting to be able to save a desktop configuration and apply it as a template to all new users that are created later.
A very good backup tool with support for many backends such as B2, S3, REST, sftp, rclone and others. https://restic.net
Very good. Thank you.