14

I am about to upgrate from 17.10 to 18.04 but I'm afraid to lose all my Gnome desktop preferences in the process (always been using Unity until 17.10). I made many changes through "Gnome Tweak tool" and I would like to backup all the current config so I can restore it in my new installation (the same question applies for a fresh

At the same time, I'd like to know if there's a similar way to backup all other configuration for Gnome in general (Nautilus, etc.)

Any info would really help, thank you in advance...

R Pennese
  • 1,145

1 Answers1

30
  1. From the terminal, execute the following to save your gnome settings:

     cd ~
     dconf dump / > saved_settings.dconf
    

    Keep the saved_settings.dconf file in a safe place so you can use it after you upgrade.

  2. From the terminal, execute the following to restore your gnome settings:

     cd ~
     dconf load -f / < saved_settings.dconf
    

(I suggest doing a test to make sure this works for you: Save the settings as shown above in step 1. Then make a few test changes using Gnome Tweaks. Finally restore the settings, as shown above in step 2. If everything restores to the way you had it before, you can use the saved file to restore settings after you upgrade.)

Note: There may be some settings that have changed between Ubuntu versions, and you will need to fix those manually. However, per vanadium's comment below, most settings will transfer over just fine.

Enterprise
  • 12,352
  • Is there a reason why you have to cd ~ first? – SOFe May 16 '20 at 14:19
  • 4
    It is not necessary, as long as you can read/write to the directory where you saved the file. I put this command for people who are very new to the command-line, so there is a common place to save and load the configuration file from. (I imagined a scenario where a new user cd-d into theDocuments folder, ran the first command to save the configuration, then rebooted, and couldn't find the saved file because they were in a different folder upon opening the terminal. With cd ~ it is consistent for everyone, and the user is guaranteed to have read/write permissions in ~ (i.e. home). – Enterprise May 16 '20 at 17:15
  • 1
    dconf load -f is needed, or else the first “non-writable key” drops the rest of your config data. – Andrej Podzimek Mar 12 '23 at 20:51