Allows to add arbitrary files and dconf keys to Sailfish OS backups. Requires Sailfish OS 3.2 or greater.
Sailfish OS applications can declare what they need to be added to the backup by providing [X-HarbourBackup] section in their desktop file, which looks like this:
[X-HarbourBackup] BackupPathList=.local/share/foil/:Documents/FoilAuth/ BackupConfigList=/apps/harbour-foilauth/
BackupPathList is a colon-separated list of files and directories to backup. Paths are relative to the home directory. Directory names end with a slash and are copied recursively. Absolute paths are ignored.
BackupConfigList is a colon-separated list of dconf keys and groups. Similarly to directories, group names end with a slash and are saved and restored recursively. There is one important difference, though - the existing contents of dconf groups is lost during restore and is completely replaced by whatever was saved in the backup.
Source code: https://github.com/monich/harbour-mybackup
Translations are welcome in the form of GitHub pull requests.
Stay safe, backup often!
Attachment | Size | Date |
---|---|---|
![]() | 136.2 KB | 17/01/2021 - 15:46 |
![]() | 150.4 KB | 17/01/2021 - 15:46 |
![]() | 135.12 KB | 11/01/2021 - 03:00 |
![]() | 149.37 KB | 11/01/2021 - 03:00 |
![]() | 134.27 KB | 10/01/2021 - 18:50 |
![]() | 148.59 KB | 10/01/2021 - 18:50 |
![]() | 131.92 KB | 10/01/2021 - 02:44 |
![]() | 146.44 KB | 10/01/2021 - 02:44 |
Comments
Firefox84
Sat, 2021/01/16 - 23:38
Permalink
Do you know "My data transfer" it was a quite similar app that unfortunately was discontinued. The source can be found here: https://forum.sailfishos.org/t/my-data-transfer-missing-from-openrepos/2887
magare
Mon, 2021/01/11 - 11:26
Permalink
Great and big Thanks!
Notice one thing: I selected the entire /home/nemo folder for backup, it took a long time 30+ minutes and I stopped the process because I noticed that user data storage was running out of space. My entire /home folder uncompressed is 3.7 GB, compressed is 1.2 GB, but the backup had already consumed 8 GB when I stopped it. I suspect that the reason is some temporary file that happens in the /home/nemo folder itself or something with android_storage, don't know.
slava
Mon, 2021/01/11 - 13:35
Permalink
I think that's because the temporary files created during the backup process (those are currently under under
~/.local/share/system/privileged/Backups-tmp
) were being added to the backup.If that's not enough, some things (e.g.
~/Pictures
) are going to be included into such backup more than once.I need to check if source files are already under the destination directory and skip those.
I'll also consider hard-linking the files during the backup process if both source and destination are on the same filesystem - that would speed up the process and save the space.
Bocephus
Mon, 2021/01/11 - 07:54
Permalink
Excellent idea; very convenient. The standard backup leaves a lot to be desired.
Malakay
Mon, 2021/01/11 - 00:29
Permalink
Hi, did I understood correctly, that purpose of this app is to mark certain apps to be obtained in backup in standard backup proccess? Can someone confirm or explain? :)
slava
Mon, 2021/01/11 - 02:55
Permalink
Well, I tried to explain it in the description. It allows you to add arbitrary data and dconf entries to the backup (and then restore those from the backup). Check the backup talball with
tar -tvf
, the configured items should be there underMyBackup/
The application integration thing is just a convenience. If you know which files and dconf keys are being used by the application, you can add them manually. But I doubt that you know much about applications which you haven't written yourself))
Malakay
Tue, 2021/01/12 - 00:36
Permalink
I dont know what Dconf entries are :D So, for example - when I want to backup Acid Pass app, I backup with this and when its needed to be restored, I can restore it from backup. Does backed-up app need to be installed and then restored, or whole app will be restored without reinstallation?
slava
Tue, 2021/01/12 - 01:29
Permalink
That really depends on the app. DConf and filesystem are two places where apps can persistently store their state. What would actually happen when you restore app's data and configuration from the backup, depends on the app. In any case you better exit the app prior to restoring its data/configuration (to avoid partially or completely overwriting the data you've just restored) unless the app handles its persistent data and configuration being changed behind its back (like my Counter app does). So, it's really case-by-case. Sometimes it will work, sometimes it won't. The
[X-HarbourBackup]
entry in the .desktop file could serve as an indication that it at least should work.And this tool isn't even supposed to backup the contents of app's rpm. Those files can be easily restored by reinstalling the app.
nephros
Sun, 2021/01/10 - 20:45
Permalink
Wow, this is very cool. Brilliant idea with the .desktop file parameters!
eson
Sun, 2021/01/10 - 10:59
Permalink
Thanks a lot!