Cloud sync all budgie-settings / backup & restore

Ubuntu Budgie settings backup - workflow logic and task breakdown

Workflow Logic

Backup

  1. Create backup directory ~/budgiebackup/. We will use this directory to store temporary files. Upon completion, we will create an archive and remove this temporary folder.
  2. Query installed budgie software, filter by “budgie applets” output list to file.This is needed to avoid issues when restoring budgie settings with dconf, as restoring an applet that is not installed will not give a desirable result.
  3. Query installed budgie themes, filter by “theme name”, and output list to file. This will be a specific query limited to only specific themes that are supported by ubuntu budgie team. Therefore themes available in the budgie-themes panel.
  4. Save budgie applet data, such as notes. Available in ~/.config/budgie-extras.
  5. Save plank launchers configuration. Available in ~/.config/plank.
  6. Save budgie settings by dumping dconf to file, filter by “/com/solus-project/”.
  7. Save plank docks settings by dumping dconf to file, filter by “/net/launchpad/plank/docks/”.
  8. Compress all files in the temporary folder “~/budgiebackup/” into a .tar.gz archive called “budgiebackup.tar.gz”.
  9. Delete temporary folder “~/budgiebackup/”.

Restore

  1. Decompress/extract tar archive “budgiebackup.tar.gz” to temporary location “~/budgiebackup/”.
  2. Install PPAs used by ubuntu budgie applets and themes.
  3. Grab previously installed budgie software from list (backup task 2), and issue install command.
  4. Grab previoulsy installed budgie themes from list (backup task 3), and issue install command.
  5. Restore budgie applet data, from backup archive (backup task 4) to ~/.config/budgie-extras.
  6. Restore plank configuration, from backup archive (backup task 5) to ~/.config/plank.
  7. Restore budgie settings using dconf, from file (backup task 6).
  8. Restore plank settings using dconf, from file (backup task 7).
  9. Delete temporary folder “~/budgiebackup/”

Task Breakdown - Backup

Backup Task 1.

mkdir ~/budgiebackup

Backup Task 2.

dpkg --get-selections \budgie*\*applet | awk '{print $1}' > ~/budgiebackup/budgiebackup-applets.txt

Backup Task 3

dpkg --get-selections ubuntu-budgie-themes | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections ant-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections arc-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections evopop-gtk-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections adapta-gtk-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections materia-gtk-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections vimix-gtk-themes | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections plata-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt
dpkg --get-selections pocillo-icon-theme | awk '{print $1}' >> ~/budgiebackup/budgiebackup-themes.txt

Backup Task 4

rsync -vah ~/.config/budgie-extras ~/budgiebackup/

Backup Task 5

rsync -vah ~/.config/plank ~/budgiebackup/

Backup Task 6

dconf dump /com/solus-project/ > ~/budgiebackup/budgie-dconf-dump

Backup Task 7

dconf dump /net/launchpad/plank/docks/ > ~/budgiebackup/plank-dconf-dump

Backup Task 8

cd ~/ ; tar -czvf budgiebackup.tar.gz budgiebackup/

Backup Task 9

rm -R ~/budgiebackup/

Task Breakdown - Restore

Restore Task 1

mkdir ~/budgiebackup/

Restore Task 2

cd ~/ ; tar -xzvf budgiebackup.tar.gz

Restore Task 3

sudo add-apt-repository -y ppa:ubuntubudgie/backports
sudo add-apt-repository -y ppa:tista/adapta
sudo add-apt-repository -y ppa:tista/plata-theme

Restore Task 4

sudo apt-get install $(awk '{print $1'} ~/budgiebackup/budgiebackup-applets.txt)

Restore Task 5

sudo apt-get install $(awk '{print $1'} ~/budgiebackup/budgiebackup-themes.txt)

Restore Task 6

rsync -vah --delete ~/budgiebackup/budgie-extras/ ~/.config/budgie-extras 

Restore Task 7

rsync -vah --delete ~/budgiebackup/plank/ ~/.config/plank

Restore Task 8

dconf load /com/solus-project/ < ~/budgiebackup/budgie-dconf-dump

Restore Task 9

dconf load /net/launchpad/plank/docks/ < ~/budgiebackup/plank-dconf-dump