Backing up a device with dd

Thank you, filip.k for the encouragement! I did not find that solution yet, but re-reading the thread again and again to find something positive. However, my question is general, not related to this update. In general, how can I make an exact, bit-by-bit copy of my current state, and how to recover anytime in the future? Not just the built-in “backup” function, which copies out a few megabytes of data, rather, a linux type dd command, to make an exact copy of my internal drive into an .img file, and recover it later, instead of flashing an old plain image? Is it possible? Then I would feel safe. Trusting the same “update” process again is too risky. Got burned once, don’t wanna get burned a second time, too much time to re-install everything in case of a failure…

3 Likes

Did you try the search function? Great feature. There were many discussions on native backups.

3 Likes

Yes I tried, but it seems I haven’t tried hard enough. I will try harder. I will search for “native backups”. This expression did not cross my mind until now. Thanks.

1 Like

I tried to search for “native backups”, but did not find anything relevant to my question.

I tried a duckduckgo AI search, and got this:
”To create a complete dd backup of your Sailfish drive, you can use the command dd if=/dev/mmcblk0p76 of=/mnt/your_backup_file.img bs=16M, replacing /mnt/your_backup_file.img with your desired output file name. Ensure you have the necessary permissions and be cautious, as incorrect usage can lead to data loss.”

This sounds legit. Approved?

NO! Each phone has many partitions. They are not even the same between the phones.

For me WT.Sane mentioned the forum search function. Indeed there are good discussions on your topic.

I had searched here in the forum for: dd if=/dev.

e.g. I found: “Full dd backup of rootfs and /home as flashable images

3 Likes

Thank you, this was a long, but information-rich read indeed for my XA2 Ultra.
I am still hesitant to try anything until I get a second identical XA2 Ultra though.
Too many times I read that for some it works, for some others it doesn’t work.

It is also unclear to me which step does exactly what until the dd command.
I understand Linux, but I have no idea why mobile phones are so complicated vs desktop computers. I can dd if=/dev/something of=/dev/somethingelse easily on linux.

Here I have to know the names of the partitions upfront, I guess there is no lsblk command.
Also, I should also know how many partitions are with WHAT names, and what are they for.
E.g. people mentioned they want the Android Support files as well, yet nobody knew where they are.

I think those people who wrote this (this = Sailfish OS) should know, but here I could not find them. They should know how they made Sailfish OS, and how to back it up properly… I am still hesitant and anxious, as there is no clear path to a safe backup.

Indeed the only solution is (sadly) to try to find another XA2 Ultra (time + money). Then I could try everything and make mistakes (short of bricking them), would feel safer.

With this much uncertain information I just keep my phone as-it-is and do not dare to tinker with it. Thanks for the goodwill and the ideas though, appreciated! :slight_smile:

Here a link to the SFOS help:

from the people made this. “Backup” here means not the backup function under the setting app.

1 Like

Thank you, hanswf. That is way too little, too useless (to me at least). Whatever it backs up, it is insignificant details that would be easy to restore anyway even without a backup. I use it, I do backups both to the memory card and my Nextcloud, but last time when the update resulted in the crash and telnet thing and after that not even a restore factory settings was possible and had to re-flash the whole thing, I lost all the apps and settings I had, and spent 2-3 days trying to re-create everything from my fading memory, because obviously I did not write down on a piece of paper what apps I did install… So that backup feature is, at least to me, useless to restore the phone to exactly where it was before the update. I will not spend again many days re-installing all my apps. That is why after that failure I pause everything, will never trust any new updates, and will use the phone as-it-is, and only after I have a 100% fool-proof method to keep my phone working exactly as I already had the day before, then I may experiment with these beta things. I am getting old, and I need to weigh whether my time and energy is worth the effort. For a few bugs being ironed out I will not spend 2-3 days painfully trying to re-install everything I was using before a failed update. I am also seriously thinking about not using smartphones anymore and going back to the laptop + dumbphone combo that I was using for decades without a problem. I don’t know what I would be missing without a smartphone, but too much time wasted in troubleshooting to make it fun. I am typing this on my desktop PC, needless to say. Smartphones are extremely limited, even when they work. I try not to rely on them, they are very unergonomic from the ground up (small screen, no keyboard, no FM radio, no IR port, no earphone jack, no dedicated camera buttons, no HDMI-out like on a Nokia N8, etc etc), fortunately my XA2 Ultra is still somewhat usable, but even that is far inferior to the (also Sony) Xperia Z5 Compact, which is my all-time favorite phone, along with the Samsung Note 3. I still have both, but alas, cannot install Sailfish on them, so they are stuck with an old version of Android, thus hardware=perfect, software=limited. I had enough of this hamster-wheel where gradually everything good is taken away from us and we are left with limited use devices. I may ditch smartphones altogether and keep using my desktop/laptop and use my dumbphone for sms/calls. Having said that, I will give a last push effort to this Sailfish project on my Sony XA2 Ultra, if it is “smooth sailing” I will be happy, I think this is the right approach (having unadulterated Linux on a phone is the best), just do not wish to tinker with it too much, I am too old for that kind of fun anymore. ‘Nuff said :slight_smile: Peace

3 Likes

Have you read here? Create a backup image ... | SailfishOS community wiki

2 Likes

On my daily phone i deleted the Jolla account after successful installation. This prevents the phone from checking for updates and accidentally triggering a version update on a well running SFOS. Access to Storeman, Chum and AAS remains possible after deleting the Jolla account. Every update that comes out I check carefully on my testphone before doing it on the daily driver. For this, re-enter the Jolla account creds and then Jolla shop + system update works again.

In Settings > Sailfish OS updates, there is a option to turn off the automatic update check. And also the check does not trigger a system update, that needs to be done by the user.

7 Likes

Yes, but it’s only one tap. Once I did accidentally, and this plus a bad bad internet connection I had this time resulted in a failed update and I had to reflash. Since this time I’m veery careful!

1 Like

Thanks for the link. I have read it, but I have more questions than answers there.

1. Seriously, “Step 1.6: Type in „3“ to open a shell.“? This must be a typo.

2. This: “Attention: This shoul be of the same SailfishOS version as your phone“ is definitely a typo.

3. Then “During this time, no progress is shown.“ really? Why not using the “status=progress” added to “dd if=/dev/sda79 of=/mnt/backup.img bs=1M“?

4. Earlier mentioned that no two phones have the same partition name, so why should I trust this line “dd if=/dev/sda79 of=/mnt/backup.img bs=1M“ or this one “mount /dev/mmcblk0p1 /mnt“ verbatim? Certainly, for my device these “mmcblk0p1” and “sda79” shold be different, but how to find out WHAT are these for me? On Linux simply lsblk and I see, but here?

5. Also, in Step 6 how about reverting for phones not on that list, e.g. my XA2 Ultra?

Empathy is the skill to put ourselves in the shoes of others and seeing what they see. When I help, I try to be as elaborate as possible, thinking of every possible scenarios, not only a few… reading these topics is like trying to re-assemble a broken vase from fragments, but always some important part is missing, rendering the advice incomplete, unable to follow it, because instead of solving a problem, it may even cause a bigger one (like bricking the phone, like it almost happened in the last update). I wish this was done a bit more thoroughly. Until updates become fool-proof for every single device Sailfish is supported for (e.g. the XA2 Ultra, AFAIK, is supported), I hold my horses, stick to 5.0.0.68. I need a 100% working backup-restore function first, other than buying yet another identical phone just to feel safe… :slight_smile: I hope it is not too much to ask…

1 Like

True. I realized that if I just ignore the pesky update/upgrade notice and DO NOT ACT (do not download it), then (I hope!) my current version will remain intact and working. I hibernate myself in this mode until I can be 100% sure that no more “2-3 days re-installing everything” is the risk to take to upgrade.

1 Like

Fixed that, sorry. This should say “3”.

Fixed. One letter was missing

Yes. That’s why the tutorial recommends you to open a second session with a command that gives you the progress every five seconds

I’m not an expert on this, I just wrote down this wiki based on a thread where it was discussed how to do that on an Xperia 10 III and I also only tested it on this phone. If the partitions are really different on different phones, I will adapt the wiki entry.

For other phones, this is not needed. When you have an XA2 Ultra, in the first step, you did fastboot boot hybris-recovery.img
This temporarily boots the hybris-recovery image. But for the phones listed, you need to overwrite the bootloader with fastboot flash boot_a hybris-recovery.img, etc.
That’s why for those models, you need to reset that. For the XA2 Ultra you mentioned, this step is just not needed, as the image is only temporarily booted and when you reboot, it should boot the normal image (i. e. normal SFOS) again.

2 Likes

Thank you for the clarification. Would be nice to include this extra information (“XA2 users do not need this”), otherwise it is just missing and XA2 users (those who have no idea about temporary booting, ie. the technically not savvy) might be confused (like I was).

Re dd progress, perhaps I did not express myself clearly. Let me try again: WHY NOT using the standard syntax for the dd command, which includes “status=progress” as a parameter that can be included in the command? Why that complicated extra detour? Example:

dd if=this of=that bs=1M status=progress ← this would show the progress.

So, why using a more complicated method? This normal command does not work, perhaps? TIA :slight_smile:

1 Like

Did you check the “see also here” -part (first thing under the header), where this is explained?

I must admit, I’m not the one that came up with this. What I basically did was I gathered such tutorials from various forum threads and wrote a nice wiki page from them.

I have personally never used dd before I found this info in the forum so I just don’t know about its parameters and/or if your example would work here. I’m sorry

1 Like