I now set up full backup of the Jolla Phone over rsync, in hope that it will simplify a future migration (including: migration to an identical phone after a full loss of the device).
It uses root ssh access to backup all apps and data. This might not be ideal, but I am not very concerned about ssh attacks with public key authentication.
My steps:
rsync
Install rsnapshot from Chum, it includes rsync; alternative is pkcon, but having it from a repo like Chum makes it easier to update and manage, and it survives OS updates.
root account
Taken from here: SSH How-to: type CLI terminal commands into your phone from your Linux computer - #4 by martinh
Computer: create public keys
$ ssh-keygen -t rsa
$ ssh-copy-id defaultuser@192.168.1.83
(pwd)
JP2601:
$ devel-su
(pwd)
# mkdir -p ~/.ssh/
# cp ~defaultuser/.ssh/authorized_keys ~/.ssh/
Now works on the computer, without password
$ ssh root@192.168.1.83
rsync script on the computer
#!/bin/bash
IP=192.168.1.83
ARCHIVEDIR=~/backups/JP2601/
LOG=/tmp/logfile.txt
rsync -avz --recursive --checksum --delete --copy-links
--exclude={'defaultuser/.cache',
'defaultuser/android_storage/Pictures/.thumbnails/',
'defaultuser/.local/share/org.sailfishos/browser/.mozilla/cache2/',
'defaultuser/.local/share/org.sailfishos/browser/.mozilla/storage/default/',
'defaultuser/.local/share/org.sailfishos/captiveportal/.mozilla/cache2/entries/',
'.pk-zypp-dist-upgrade-cache/',
'.zypp-cache/',
'zypp-tmp/'} root@${IP}:/home/ $ARCHIVEDIR &> $LOG
(reformat the “exclude” lines on a single line)
I excluded the browser cache files that I don’t need to have backup-ed. Other users might want to keep browser storage to restore/migrate the data related to some websites.
I have a few Android apps (government, public transport, healthcare…), total size of my backup is 2,9 Gb. With the cache data (that is excluded), it would be 4 Gb of data. I forgot to take note of how long it took. Running the script for daily incremental update takes 10-20 seconds.