[SOLVED] Backup restored incompletely from Jolla 1 to Xperia 10

I made a backup to the SD card using Settings > Backup on a Jolla 1. Then, I inserted the SD card into an Xperia 10 and tried to restore the last backup. It appeared to work, but it didn’t restore Messages, Nodes and People. During the restore process, only the icons for Accounts, Browser, Calendar and Gallery appeared on the screen, inside the spinner. The icons of the missing elements never appear, and the process ends when the spinner is at ~40%, but the result is “successful”.

How can I run the backup process via CLI, so I can see what the actual error is, in the background?

Something similar has happened before, when I had files containing the colon ( : ) sign in some filenames, and had to rename them before creating the initial backup. On that occasion, I had to manually run tar to see what the problem was. But this time, tar works without issues, so I don’t understand what prevents the complete import.

1 Like

Do you have the same OS version on both phones?

You can run journalctl in CLI and check for issues.

ssh to your phone and run

journalctl -f

then run restoring backup from UI.

You’re right, journalctl -f did provide feedback, after devel-su though.

I found this, confusingly:

estart[7859]: [W] unknown:0 - [Log] "Not running unit script for Media, no relevant contents found to restore"
estart[7859]: [W] unknown:0 - [Log] "Not running unit script for Messages, no relevant contents found to restore"
estart[7859]: [W] unknown:0 - [Log] "Not running unit script for Notes, no relevant contents found to restore"
estart[7859]: [W] unknown:0 - [Log] "Not running unit script for People, no relevant contents found to restore"
estart[7859]: [W] unknown:0 - [Log] "Not running unit script for Phone, no relevant contents found to restore"

Indeed, Messages, Notes, People and Phone information has not been imported. But if I extract the backup manually, with tar, it definitely contains the folders People, Notes etc. There’s even a People/data/all.vcf.

Also, the version is Sailfish 3.3.0.16 (Rokua) on both phones, identically.

I found something interesting: the backup archive itself contains all the folders, as expected.

But see what happens when I run the following (what journalctl -f says, actually):

# archivemount -o allow_other -o nosave /run/media/nemo/9016-4EF8/sailfish_backup_2020-07-29T12-48-19Z.tar /home/nemo/.local/share/system/privileged/Backups-tmp/mount/sailfish_backup_2020-07-29T12-48-19Z
# cd /home/nemo/.local/share/system/privileged/Backups-tmp/mount/sailfish_backup_2020-07-29T12-48-19Z/
# ls
Accounts  Browser   Calendar  Gallery

Why don’t the folders Phone, Messages, Media and Notes appear?

I fixed it. Somehow the archive wasn’t properly read by archivemount, but I don’t know why. Extracting the backup and then re-archiving locally, on the Xperia 10, worked:

# cd /run/media/nemo/9016-4EF8
# mkdir backupfix
# cd backupfix
# cp ../sailfish_backup_2020-07-29T12-48-19Z.tar ./
# tar x -f sailfish_backup_2020-07-29T12-48-19Z.tar
# rm sailfish_backup_2020-07-29T12-48-19Z.tar
# tar c -f sailfish_backup_2020-07-29T15-00-00Z.tar
# cp ./sailfish_backup_2020-07-29T15-00-00Z.tar ../

These commands rebuild the archive, then copy it back at the root of the SD card, which makes it appear in Settings > Backup. Restoring from this archive worked.

7 Likes

That does not make sense, makes it?

But nice you found a workaround and posted back!

I’ve read somewhere that Sailfish X is using BusyBox on the Xperia devices, which contains a simplified variant of tar. By contrast, Sailfish on the original Jolla 1 uses the GNU tar.

I don’t know exactly if this is true (looks like it though), and I don’t know if this even affects archivemount. But it’s the only difference of any relevance that I found.

3 Likes

I had no problems like this when going from JollaC to XA2.
But I also use tar-1.28 from NielDK instead of the Jolla default tar-1.17 ( if at all, see your busybox comment - ‘type tar’ ). And I do not remember if I had that installed before restoring the backuo.

Thank you VERY much for posting this solution back here!
It helped me to restore to a 3.2.0.12 (Redmi 5 Plus vince)
from a 3.0.0.8 (Lemmenjoki) older Redmi device.

… except call logs.

I simply used TotalCommander to extract / recompress the tar file, and an external USB 16GB pendive attached with an OTG cable.

1 Like

Restored Call Logs too with this method:

  1. In a terminal window execute this command: (No su-devel rights needed.)
    commhistory-tool export -calls calls.dat
    it will create a file in default /nemo/ directory.

  2. Than copied calls.dat file to the new phone, and restored with following command:
    commhistory-tool import calls.dat

  3. Stopped the Phone app so it reloads the new data:
    pkill voicecall-ui

To move files and execute commands easily with Copy/Paste from a Windows PC or Laptop, I recommend to use this free program:
https://www.bitvise.com/ssh-client
(It’s like Putty, but much more advanced. Putty webpage recommended it.)

3 Likes

7th line of code not accepted.

correction :

tar c -f sailfish_backup_2020-07-29T15-00-00Z.tar backupfix/ .

Thaks anyway, excellent workaround ! d (°_°)

1 Like

Even with NielDK’s Tar, I had to restore People and Notes manually.