Transfuse "Backup, compress, and restore your plasma desktop configurations"

There used to be a thread on this, but maybe it was the previous forum :thinking:

Anyhoo, Transfuse was built years ago, and recently received some updates.

The gist is that it should make saving, transferring, applying configurations between KDE Plasma installs or users relatively easy.

The script can copy, compress, backup (copy+compress), and apply various settings as well as create and use package lists.

Example uses

Help Info

#########################################################################
#                                                                       #
#   TRANSFUSE - a Script to Backup and Restore Plasma User Configs      #
#                                                                       #
#   transfuse.sh [option] [USER/PATIENT]                                #
#                                                                       #
#   options:                                                            #
#   help, -h, --help                                  show brief help   #
#   backup, -b, --backup USER                     backup USER configs   #
#   backuptopical, -bt, --backupt USER         backup USER appearance   #
#   backuproot, -BR, --backuproot                 backup root configs   #
#   copy, -C, --copy USER                    copy but do not compress   #
#   compress, -c, --compress                  compress copied configs   #
#   pkglists, -p, --pkglists        create list of installed packages * #
#   pkgrestore, -pr, --pkgrestore            reinstall from a pkglist * #
#   restore, -r, --restore PATIENT       restore configs /to/ PATIENT   #
#                                                                       #
#                                 NOTES                                 #
#   Environment Variable        CHARTS=1          More verbose output   #
#   Environment Variable        COVERED=1       Forgo wallpaper steps   #
#   * pkg* options depend on pacman package manager                     #
#                                                                       #
#########################################################################

No argument will present a menu:

 ./transfuse.sh

1) Backup    4) Restore
2) Copy      5) Help
3) Compress  6) Quit

Please enter your choice: 1

Please enter the name of the user to backup and compress configs from: manjaroo

We copied and compressed items recursively from:

~
~/.config
~/.local/share

The compressed backup is timestamped and named manjaroo_transfusion_20240203_1809.tar.gz

Package list flag:

$ ./transfuse.sh -p

 Packagelists created for 'native' and 'alien' packages and prefixed with 'Host_20240203_1819'

$ ls Host*
Host_20240203_1819_alien.txt  Host_20240203_1819_native.txt

The project is here:

As always … feedback is welcome.

6 Likes

This looks interesting…

I was confused by the words ‘backup’ and ‘copy’.

  1. ‘Backup’ simply copies to ~/Transfuse/transfusion-20240204-1433… so this is more of a snapshot. This should be mentioned in the script.

  2. Copy does the same thing, but with a folder and no compression.

  3. Testing the ‘restore’ function led to a confusing result - I would expect ‘log’ but never heard of ‘nohup’.

❯ ./transfuse.sh

1) Backup    4) Restore
2) Copy      5) Help
3) Compress  6) Quit

Please enter your choice: 4

Please enter the name of the user to restore configs to: ben
1) ./ben_transfusion_20240204_1430.tar.gz
2) Quit
#? 1

Backup file ./ben_transfusion_20240204_1430.tar.gz selected
 
Are you sure you would like to restore ./ben_transfusion_20240204_1430.tar.gz to /home/ben/? (Y/N) y 

Configs Restored from ./ben_transfusion_20240204_1430.tar.gz

1) Backup    4) Restore
2) Copy      5) Help
3) Compress  6) Quit

Please enter your choice: nohup: appending output to 'nohup.out'

nohup
Omitting both --window and --windowclass arguments is not recommended
Checking screens: available: (QScreen(0x564fb725c6f0, name="HDMI-A-0")) redundant: QHash() fake: QSet() all: (QScreen(0x564fb725c6f0, name="HDMI-A-0"))
Checking screens: available: (QScreen(0x564fb725c6f0, name="HDMI-A-0")) redundant: QHash() fake: QSet() all: (QScreen(0x564fb725c6f0, name="HDMI-A-0"))
kf.plasma.core: Could not locate metadata for theme "breath"
kf.plasma.core: Could not locate metadata for theme "breath"
kf.plasma.quick: Applet preload policy set to 1
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/InlineMessage.qml:265:13: QML SelectableLabel: Binding loop detected for property "implicitWidth"
org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout
org.kde.plasma.kicker: DragHelper is deprecated and will be removed in Plasma 6. Use Qt Quick Drag instead.
org.kde.plasma.kicker: Kicker.WindowSystem is deprecated and will be removed in Plasma 6. Use KWindowSystem/KX11Extras instead.
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:47: TypeError: Cannot read property 'location' of null
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:48: TypeError: Cannot read property 'location' of null
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:49: TypeError: Cannot read property 'location' of null
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Panel.qml:46: TypeError: Cannot read property 'location' of null
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:243:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:217:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:207:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:187:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:159:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/UpcomingEvents.qml:228:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/UpcomingEvents.qml:212:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:107:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Loading Calendar plugin HolidaysEventsPlugin(0x564fb85d9b30)
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:16: Error: Qt.createQmlObject(): failed to create object: 
    file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/inline:1:1: module "org.kde.plasma.PimCalendars" is not installed
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:243:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:217:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:207:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:187:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/Logic.qml:159:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/UpcomingEvents.qml:228:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/UpcomingEvents.qml:212:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:107:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:16: Error: Qt.createQmlObject(): failed to create object: 
    file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/inline:1:1: module "org.kde.plasma.PimCalendars" is not installed
file:///usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/ui/main.qml:139:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout
file:///usr/lib/qt/qml/org/kde/kirigami.2/templates/InlineMessage.qml:265:13: QML SelectableLabel: Binding loop detected for property "implicitWidth"
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:84:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:79:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:74:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:84:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:79:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:74:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:84:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:79:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:74:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:84:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:79:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimeFormatSizeHelper.qml:74:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.kscreen/contents/ui/main.qml:30:5: Unable to assign [undefined] to bool
Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/NotificationHeader.qml"
Cyclic dependency detected between "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/global/Globals.qml" and "file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/ThumbnailStrip.qml"
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/MediaController.qml:202:4: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/InputManager.qml:6:2: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/DynamicFilterModel.qml:30:34: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/DynamicFilterModel.qml:30:34: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/DynamicFilterModel.qml:30:34: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/DynamicFilterModel.qml:30:34: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/DynamicFilterModel.qml:30:34: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.volumewin7mixer/contents/ui/Mpris2DataSource.qml:159:31: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml:95: TypeError: Cannot read property 'airplaneModeAvailable' of null
file:///usr/share/plasma/plasmoids/org.kde.plasma.networkmanagement/contents/ui/main.qml:95: TypeError: Cannot read property 'airplaneModeAvailable' of null
org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout
file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml:19:1: QML DropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "preferredHeight"
org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout
file:///usr/share/plasma/plasmoids/org.kde.plasma.timer/contents/ui/CompactRepresentation.qml:73:5: QML GridLayout: Binding loop detected for property "width"
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:16: Error: Qt.createQmlObject(): failed to create object: 
    file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/inline:1:1: module "org.kde.plasma.PimCalendars" is not installed
file:///usr/share/plasma/plasmoids/org.kde.plasma.colorpicker/contents/ui/CompactRepresentation.qml:51:5: QML GridLayout: Binding loop detected for property "width"
file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/PlasmaCalendarManager.qml:16: Error: Qt.createQmlObject(): failed to create object: 
    file:///usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/calendars/inline:1:1: module "org.kde.plasma.PimCalendars" is not installed
file:///usr/share/plasma/plasmoids/org.kde.panel/contents/ui/main.qml:19:1: QML DropArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "preferredHeight"
file:///usr/share/plasma/plasmoids/org.kde.kscreen/contents/ui/main.qml:30:5: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/main.qml:18:1: QML MouseArea (parent or ancestor of QQuickLayoutAttached): Binding loop detected for property "minimumWidth"
qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead.
QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
file:///home/ben/.local/share/plasma/plasmoids/com.github.zren.alphablackcontrol/contents/ui/Main.qml:85: SyntaxError: JSON.parse: Parse error
qt.svg: <input>:1:14337: Could not resolve property: #linearGradient10962
QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
file:///usr/lib/qt/qml/org/kde/plasma/extras/PlaceholderMessage.qml:238:5: QML Heading: Binding loop detected for property "verticalAlignment"

I similarly stumbled onto a weird outcome whilst hammering on restore a minute ago.
As it always is … should have spent just one more evening before reposting.
Welp. :pick:

1 Like

Okey doke. @Ben

Updates should make the thing stable once more.

Note this was only really an issue with the automated ‘restore’ option.
Backups themselves were, and continue to be, viable even if created previously.
Though certain paths have been added for inclusion or augmented over time.

(re-download from gitlab source to ‘update’)

While I am relatively happy with the ability for the script to carry over configurations … the automated refresh of the desktop to make those configurations immediately apparent is a constantly changing challenge.

And while I am also pretty happy with the aesthetic impact in the majority of cases, I have decided to accept, for now, an extra bit of text encouraging the user to log out to finish up.

PS.
As always … Plasma shifts from time to time.
For whatever reason Keyboard Shortcuts seem to resist being applied.
In most cases the shortcuts appear to be carried over, but not properly set to any keyboard combination though not always. This is despite the presence of the appropriate files/entries.
(ex, in one restoration all of my application shortcuts were created, but only the combination “Super+F” for Dolphin was actually set according to Plasma)
It may be worth including here that the Shortcuts KCM has its own menus for exporting and importing groups and schemes of shortcuts.

Update 07-02:
Killing and restarting kglobalaccel5 seems to reliably apply the restored keyboard shortcuts.
It has been added to the script to fire while other parts of plasma are being cycled. :slight_smile:

PPS.

Copy and Compress are separate functions to facilitate someone wanting to make augmentations.
Backup does both in one action and is somewhat considered the ‘regular use’, as the later restore function looks for the compressed tar balls to use.
In fact there are a lot more options than what is presented in the menu, as the original intent was to use flags only ( ex: ./transfuse -b ).

1 Like

Updated again.

And cut it at this tag/version. (0.5.0)

New dev branch already contains lots of updates … probably most notably is rsync will no longer be required. If either an environment variable is used or if rsync is not found it will fall back to cp.

If anyone is interested in getting or looking at the dev branch then its here
(Notice: the ‘download’ instructions for the dev README are technically incorrect as they reflect a URL in anticipation of merge with main branch. To download augment or access manually otherwise)

1 Like