Ubuntu – How to read GSettings values from a filesystem backup

dconffile formatgsettingsmigration

I have a complete filesystem backup from an old Ubuntu installation. I'd like to retrieve some data from it that was stored via GSettings, e.g. my old GNOME Terminal color selections or the commands from custom keyboard shortcuts.

This answer says my data is stored in ~/.config/dconf/user, which is some kind of binary database.

How can I read it?

Best Answer

Suggested by a community member in the GNOME IRC channel:

  1. Copy the old ~/.config/dconf/user to /tmp/dconf/user.
  2. Export the data to a human-readable format:

    XDG_CONFIG_HOME=/tmp dconf dump / > old-gsettings-data.txt
    
  3. Optionally edit the data in a text editor and load it into the current database with dconf load.

Related Question