How can I issue system backup over SSH?

Display on my Xperia 10 is shattered and almost completely dead in terms of touch input.
Is there please equivalent command I could run over SSH to start the backup process? I can move files but I need the messages, contacts, notes, call history etc.

Unfortunately I do not think so:

But you will find on TJC all info how to do that step-by-step…
Maybe some one else has a link at hand with a comprehensive collection?

Would be worth to add here.

2 Likes

From above link or … or

Contacts:

devel-su -p vcardconverter -e contacts.vcf
or
devel-su -p vcardconverter --export contacts.vcf

Calendar:

devel-su -p icalconverter export calendar.ics

Messages:

commhistory-tool export -groups messages.exp

Calls:

commhistory-tool export -calls calls.exp

(both above working on DB file
/home/nemo/.local/share/commhistory/commhistory.db -->
so a simple
tar -cvzf commhist.tgz /home/$USER/.local/share/commhistory/
would also work

Notes:
for notes I do not know tool, so
tar -cvzf notes.tgz /home$USER/.local/share/jolla-notes/
will do the trick

5 Likes

A while ago I suffered the same fate, so I really sympathise: it’s not a nice situation to be in. At the time I wrote this script to trigger the backup from the UI when the screen is broken.

I wouldn’t recommend anyone use the script as-is, since the UI has changed and it almost certainly needs fixing up. However, if none of the other approaches do what you need let me know and I can update it, or maybe it can provide some inspiration. In practice, I think @peterleinchen’s suggestions are a better approach.

3 Likes

Thank you both,

I did use the commands provided by @peterleinchen.
I will just add the importing commands for reference:

Contacts:
devel-su -p vcardconverter --export contacts.vcf
restored manually from file manager

Calendar:
devel-su -p icalconverter export calendar.ics
restored manually from file manager

Messages:
commhistory-tool export -groups messages.exp
commhistory-tool import -groups messages.exp

Calls:
commhistory-tool export -calls calls.exp
commhistory-tool import -calls calls.exp

to restore:
tar -xf notes.tgz --directory=/

[edit]
All that remains is probably only the configuration data for few Android apps (not the user files). Don’t you know where that is stored? I don’t think there is any configuration inside /home/nemo/android_storage/Android/data/

3 Likes

Take a look at
/home/.android/
and backup completely…

(not yet tested) …and try to restore with AlienDalvik shut down on your new phone. Activate AD and probably install apps from ./data/app/zzz.yyy.xxx/base.apk
by file manager or apkd-install.
I do not know if this works for split APKs. Then just install normally.

Furthermore it is a good idea to create a full copy of /home/$USER (and probably /usr/share) in case you miss/want some other native app’s configuration data.

I guess about the normal user data like pictures, downloads and so on you are aware.
Maybe one notice regarding e-mail downloaded attachments (only relevant in case using POP): backup ./Downloads/mail_attachments/

1 Like

Are you familiar with rsync? That’s what I use to backup my complete nemo directory , including application data and configs. You could exclude things like cache video directories.
t didn’t have to restore yet so I don’t know if it plays well with databases like those for contacts and calls. But theoretically the files should be in their respective paths.

1 Like

rclone is also worth a mention, since it supports a lot of different “cloud[1] sync” providers.

I use it for a daily photo & music sync and backup and for a weekly large backup.

[1] such an awful word

If I try vcardconverter to export my contacts I get a return code 0 and a contacts.vcf file, but for every contact I also get the following output to the commandline:
[W] unknown:0 - Variant value is a QStringList but the property's value type is neither CompoundType or ListType
What does this message mean?