Creating a back up of the Gnome desktop environment on Linux involves exporting all database configuration files out of Dconf. To install Dconf, open up a terminal and follow the instructions that correspond with your Linux OS.
Note: Dconf is a central part of Gnome, so it may already be on your Linux PC. That said, it’s always a good idea to re-install software like this, especially if you accidentally uninstalled it in the past.
sudo apt install dconf*
sudo apt-get install dconf
sudo pacman -S dconf
sudo dnf install dconf
sudo zypper install dconf
Installing Dconf on any Linux distribution is quite easy, as it as a central part of Gnome, and the Gnome set of applications. To install Dconf, open up a terminal window, search your package manager for “dconf” and install it.
Back Up Gnome Settings
Creating a full backup with Dconf will allow you to save all Dconf settings and configurations, along with the Gnome Shell desktop environment. For most users this is overkill. However, if you’re paranoid and want to ensure that every setting is safe, this is the way to go.
Open up a terminal and use the dconf dump command to export the entire Dconf database to your Linux PC. DO NOT USE SUDO!
‘); if (navigator.appVersion.indexOf(“Mac”)!=-1) document.write(”);
dconf dump / > full-backup
The settings dump is complete. The next step is to look over the contents of the file, to verify that the backup ran correctly. Using cat will print the contents of the data in a terminal, and allow you to look it over.
If everything looks good, type clear and create a new folder inÂ ~/Documents to hold the backup file. Keeping the Dconf backup in a separate folder will ensure that it doesn’t get accidentally deleted.
mkdir -p ~/Documents/dconf-backups/ mv full-backup ~/Documents/dconf-backups/
If you aren’t concerned with all of the settings on your Linux desktop and are only looking to back up the Gnome desktop, bookmarks, and Gnome app configurations, this solution is best.
To start the backup process, use the dconf dump command and export ONLY the /org/gnome/ settings.
dconf dump /org/gnome > gnome-backup
When Dconf finishes dumping your settings, verify its contents by viewing it with the cat command.
Look over the file. If everything looks good, create a new folder to hold the backup on your Linux PC and place the file there.
mkdir -p ~/Documents/gnome-backups/ mv gnome-backup ~/Documents/gnome-backups/
Themes And Icons
Making a backup of Gnome Shell will make sure that, when restored, your favorites, as well as other settings are intact. However, Dconf can’t back up the icons and themes you use. If you want these to be intact when you restore your backup, you’ll need to make a copy of your custom icon themes for safe keeping.
Note: most users have custom icon themes in the ~/.icons and ~/.themes folders. If your icon themes aren’t in these folders, follow the system backup instructions instead.
tar -cvpf custom-icons.tar.gz ~/.icons tar -cvpf custom-themes.tar.gz ~/.themes mv *.tar.gz ~/Documents/gnome-backups/
Alternatively, create a system-wide backup of your icons and themes.
sudo -s cd /usr/share/ tar -cvpf custom-icons.tar.gz icons tar -cvpf custom-themes.tar.gz themes
mv *.tar.gz ~/Documents/gnome-backups/
Gnome Shell, along with all of your custom icons are backed up.
Finish up the process by putting the “gnome-backups” folder on your favorite cloud service. Alternatively, place it on a home server or an external hard drive.
Download the “gnome-backups” to your Linux PC and open up a terminal. In the terminal, use the CD command to access the files inside.
Start the restoration process by importing the Dconf backup file into the system.
Full Restore Command
dconf load / < full-backup
Gnome-only Restore Command
dconf load /org/gnome < gnome-backup
Next, restore your custom icons. To restore the icons and themes for a single user, do:
tar --extract --file custom-icons.tar.gz -C ~/ --strip-components=2 tar --extract --file custom-themes.tar.gz -C ~/ --strip-components=2
Alternatively, for system-wide icons and themes, run the following commands in a terminal:
sudo tar --extract --file custom-icons.tar.gz -C /usr/share/ --strip-components=1 --overwriteÂ sudo tar --extract --file custom-themes.tar.gz -C /usr/share/ --strip-components=1 --overwrite
After all the backup files are restored, your Gnome Shell desktop should look the way it did before the backup. If it doesn’t, press AltÂ + F2, type “r” and press enter to reset the desktop.
Can’t reset the desktop? You’ll need to reboot your Linux PC. After rebooting, log back into the Gnome Shell. Upon logging back into Gnome, everything will be back to normal.