PBM is a bash script that allows you to easily backup and restore your whole KDE Plasma desktop setup/config
./pbm.sh # interactive menu
./pbm.sh backup [name] # create a backup, timestamped if no name is given
./pbm.sh restore <name> [part] # restore everything, or one category
./pbm.sh list # list saved backups
All of the backups are stored in ~/.plasma-backups
The interactive menu covers the same commands and adds some new options like comparing a backup against
your current config, exporting and importing backups to a .tar.gz and deleting backups.
restore takes an optional second argument to bring back only part of a backup.
Anything not listed below is only restored by a full restore.
| Category | What it covers |
|---|---|
appearance |
Themes, colour schemes, fonts, icons, wallpapers, GTK and Kvantum theming, splash and lock screen |
panels |
Panel layout, desktop widgets, Plasma shell preferences |
shortcuts |
Global keyboard shortcuts, custom hotkeys and gestures |
windows |
KWin settings, effects, virtual desktops, per-window rules |
apps |
Dolphin, Konsole, Kate, Spectacle, KRunner, Bluetooth, session startup |
The script backs up thirty paths under ~/.config and ~/.local/share, covering the files
listed above along with installed Plasma themes, window decorations, KWin
scripts, Konsole profiles, icon themes and wallpapers. Each backup also records
a gsettings dump, the active colour scheme and Plasma theme, and a meta.txt
holding the creation date, hostname, Plasma version and file counts.
Paths that do not exist on your system are skipped and reported.
Every restore starts by snapshotting your current configuration as
pre-restore-<timestamp>, so an unwanted or accidental restore can be undone by restoring
that snapshot.
Import only accepts an archive containing a single top-level directory, and refuses to overwrite an existing backup of the same name.
This has only been tested on a single machine. It overwrites configuration files in place and restarts the Plasma shell, so read the script before running it against a setup you care about. A full log out and back in may be needed for all changes to take effect.
MIT
