Backup of entire phone?

Hi all,

I am currently running Lineage 15.1 and would like to install the latest FPOS temporarily for testing purposes. So: is it possible to take a backup of the entire phone? I’m asking specifically because:

  • I did take a backup of an older OS version before and have not been able to restore this one; iIrc because some partitions changed with the newer version. Could this be a real problem or can I always restore a backup no matter what happened to the phone after it was taken?
  • I’ve taken all backups with TWRP. Now I got slightly confused by https://twrp.me/faq/datamedia.html where it suggests that data/media can’t be backed up by TWRP. What would I have to do to get an exact copy of this?

Any help appreciated!

Andreas

Yes, that’s important to consider for not losing data.
The three possible solutions I’m aware of:

  1. Copy all data from /data/media to a secure place
  2. Rename /data/media folder (in TWRP->advaxnced->file manager) before doing the backup (and don’t forget to rename it back after restoring the backup)
  3. Use a tipatched TWRP (search for “tipatch” for more information) to include /data/media into your TWRP backup (that’s what I do).
2 Likes

OK, thanks. I’ve used the renaming approach and it looks like that worked.
So my only remaining concern is that a succesfull backup is one thing, but that the restore part has to work, too. But for now I take the silence to my first concern as meaning that no one shares that concern, which will have to be good enough…

It is a legitimate concern, but whether you can restore any backup depends mostly on the quality of your backup strategy.

With computer tech, things can go wrong at any time in any way. So have plans B, C etc. ready if you want to be safer.

In general:

What can possibly go wrong? And be very sceptical here, don’t assume any given stuff will work!
What would you do then?
What can you perhaps do beforehand to make your life easier in such a case?

For a start:

Don’t just blindly trust any backup software which creates one monolithic data file out of several components like e.g. the OS on a phone and your personal data on a phone.
It’s super convenient if this works, as e.g. a TWRP backup usually should. But as you legitimately are concerned about: What if this somehow fails to restore?

Then you could still save the day if you had a way to reinstall the OS you need as well as a different backup of just all your important data, and the latter in a preferably plain way so you could even restore it to a different phone, if all else fails:

  • Is your phone the only place you keep your contacts, messages, calendar data on? Bad idea. If possible, regularly sync this to a computer or to the internet. Or try to figure out whether the Apps you use managing this data already sync it or whether they can at least backup this data into files you can then transfer somewhere else.

  • Important files in Internal Storage such as pictures, videos, documents, downloads etc.? Just copy the whole Internal Storage over to a PC via USB (this can perhaps even be done when TWRP is running, depending on encryption). It’s just a bunch of folders and files, which is good for simplicity.

  • Keep everything around which would be necessary for you to install the OS on your phone from scratch.
    Just upgraded to a major new Android version? Keep the last install file(s) for the older version around … might come in handy.

  • For being prepared to exchange the phone, should the need arise:
    Can you export contacts, messages, calendar data into generic file formats which other Apps could import, or do you have a sync method in place that would work on a different phone?
    You have a copy of the whole Internal Storage on your computer? Good. But do you actually know whether your important files are really in it, and where exactly they are? Have a look. When changing phones it will not be the best concept to just dump the whole Internal Storage from the previous phone over, even if there is a chance this may possibly work when staying in the Android realm.

2 Likes

The bottom line is that a backup is not a backup practically until the (correct) data has been restored from it. I’ve seen enough cases where the backup file did not contain the required data, where the media containing the backup could not be read with available hardware, or restore could only be performed onto media that were no longer in production.

1 Like

Many thanks for all the great replies!
So I did embark on the endeavor of installing FPOS and then restoring the phone to the previous state. The part about including /data/media in the backup by simply renaming it to /data/media_ worked smoothly. However the part about getting the phone to run again after the restore didn’t. I tried a few things but always ended up stuck at the first screen after boot (the one that’s displayed in fastboot). Finally I was successful by first re-installing LOS via adb sideload and then restoring the backup on top of it but excluding “boot” in TWRP (version 3.2.3, fwiw)! This sounds slightly weird to me: why should I ever include “boot” in the backup when it doesn’t work after restoring?
Anyway: thanks once more for your support!

I’m happy to hear that you managed to restore your phone. Still I agree that it sounds very weird that you had to leave the boot partition out and that you had to install LOS first on restore. This should all (system and boot partitions) be perfectly included in the backup data.

Short update: I’ve been successful with the restore with a newer TWRP version (3.3.1).
In more detail: I’ve

  • upgraded TWRP to 3.3.1
  • backed up LOS
  • wiped everything
  • installed FPOS (which installs TWRP 3.1.1)
  • re-upgraded to TWRP 3.3.1
  • wiped everything
  • restored the LOS backup
    And that worked. So the failure to restore “boot” was related to TWRP 3.2.3. Or something else; my tries to restore the old backup got a bit unstructured after countless hours. Still the TWRP version is my best guess.

As an aside: this was likely my last experiment with my FP2. The whole reason for going through this procedure was to verify that the erroneous behavior I was observing (sporadic reboots; failure to power on from cold and dark state) was not related to LOS but rather to a defective core module. Time to order an FP3.

3 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.