How to perform a manual backup of XFCE on Linux?

XFCE backcup

In a previous article I was talking to them about the way in which we can back up our configurations our LXDE desktop environmentWell, now it's the turn for those who are XFCE users.

Even though there are tools that can automate the process, many of them, if not most, usually perform a full backup which it's not always the best, when we just want to back up certain things.

What is good about these programs is that many allow you to choose what to back up, although unfortunately something is always missing.

Although XFCE desktop environment uses a lot of tools and technologies Dconf configurations cannot be exported quickly for a simple backup solution.

For those looking to create a backup for this desktop environment they will need to create one using the file system.

If you are looking to create an XFCE bakcup, you should compress and save the files from the critical desktop into the ~ /.config folder.

Creating the XFCE backup

They should be aware that choosing to backup everything in the configuration folder will take up much more space than simply backing up files.

For this we are going to open a terminal and in it we are going to execute the following command:

tar -czvf full-backup.tar.gz ~/.config

Esto it may take a while, depending on the amount of information your folder contains.

When the process is finished they will already have the tar file which they can save, move or whatever they have in mind to do with it.

As an alternative we have the possibility to create a backup copy of the XFCE files. To start the process in the terminal we are going to execute the following commands.

mkdir -p ~/Desktop/xfce-desktop-backup
mkdir -p ~/Desktop/xfce-desktop-backup/thunar
mkdir -p ~/Desktop/xfce-desktop-backup/xfce-settings
cp -R ~/.config/Thunar/ ~/
cp -R ~/.config/xfce4/ ~/
mv ~/xfce4 ~/Desktop/xfce-desktop-backup/xfce-settings
mv ~/Thunar ~/Desktop/xfce-desktop-backup/xfce-settings

For the case of those who are Xubuntu users will need to perform some actions additional of which are to copy the Xubuntu folder into the configuration directory.

mkdir -p ~ / Desktop / xfce-desktop-backup / xubuntu-settings
cp -R ~ / .config / xubunu ~ ~ /
mv xubuntu ~ / Desktop / xfce-desktop-backup / xubuntu-settings

Ya having everything in its place we are simply going to execute the following command to create our compressed file with all the data:

tar -czvf xfce4-backup.tar.gz ~/Desktop/xfce-desktop-backup

Backup themes and icons

screenshot-xfce

How should they know toon part of the configurations and visual aspects of a desktop environment are the themes and icons, so we can make the backup of these in the following way.

They should know that there are two possible paths where they are stored, where the most common is the one within the "/ usr" folder at the root of the file system. Another location that it usually has is inside the personal folder in "/ home".

It is enough that they look for the folders and which contain the folders that they will back up.

/ usr / share / icons   y  / usr / share / themes  or in ~ / .icons y ~ / .themes.

Ya knowing the path where your icons and themes are stored, just execute the following command replacing "path" with the path where you have stored what you are going to backup:

tar -cvpf bakcup-iconos.tar.gz ruta
tar -cvpf bakcup-themes.tar.gz ruta

Now that all the custom themes and icons are in the TarGZ files, the backup is complete and you can save the compressed files to the cloud, a USB to the other hard drive or whatever you have in mind to do with them.

Once the backup is done, you can make the system change, pass the configuration to another computer, share it or whatever you like to do with it.

How to restore the XFCE bakcup?

To restore the data simply from the terminal we are going to execute the following commands:

tar -xzvf full-backup.tar.gz -C ~/

O for the case of only restoring XFCE:

tar -xzvf xfce4-backup.tar.gz -C ~/
cd xfce-desktop-backup/xfce-settings
mv * ~/.config
cd xfce-desktop-backup/thunar
mv * ~/.config

Y finally for the case of themes and icons with:

tar -xzvf icons-backup.tar.gz -C ~/
tar -xzvf themes-backup.tar.gz -C  ~/
sudo tar -xzvf icons-backup.tar.gz -C /usr/share/
sudo tar -xzvf themes-backup.tar.gz -C /usr/share/


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   guilds said

    too far-fetched, I'm using MX Linux which has its own tool to create a backup custom ISO. Use XFCE desktop. In other Ubuntu-derived distros, Pinguy Builder can be used, it also works great for creating backup ISO images. I used it until recently in Xubuntu 18.04, but I switched to MX Linux 17.1, spectacular, it has many other tools for the user and it is also based on DEBIAN Stable.

  2.   Fernando Rodriguez said

    True, I also use mx16 FOR THE SERVER installed ... but I share how stable and light and robust this distro is built, but it is worth the exercise, to know the structure of XFCE. thanks for this article.