Backup for FP2/FPOS

Hi,

there are a couple of discussions around backups. This topic came up for me now that there is another big release of Fairphone Open OS. Btw., thanks alot to bringing new major releases to the FP2!

But updater now warns that making backups is of the essence. Although this looks like Captain Obvious, and I do make regular backups of my Windows and the Linux machine.

But making backups is easy on them. I use Linux for both Win and Linux to backup entire filesystems simply with dd, and every now and then I push new files into backup Zips. So I do not actually need backup SW.

On the FP this a totally different ballgame. In the past, I did some with the built-in Nandroid, but one cannot actually call that user-friendly (or at least easy to start).

There is no ā€œbackup guideā€, a document that tells you what to do. I understand that there wonā€™t be a ā€œone stop shopā€, so internal data and SMS need some special treatment.

I donā€™t trust clouds when they arenā€™t mine (I can use the Owncloud of my employer, whom I trust, but I wonā€™t trust Google. That is why I use FP Open OSā€¦), but this exludes most non-FOSS backup apps.

Oandbackup I used to have, but at some point I deleted it, and when I now re-install it, it complains that it cannot find oab-utilsā€¦ In F-Droid, Oandbackup is two years old. There is a newer OandbackupX which claims to be the successor of Oandbackup, but that simply complains that it couldnā€™t get superuser rights and immediately terminates without doing anything.

It would be a good idea if someone could write a primer on how to backup FP Open OS, which does NOT start with ā€œUse Googleā€ or uses SW that wonā€™t run unless being executed as root (and if such SW should be encouraged, then please supply instructions on how to run them as root).

For a major SW upgrade first I would need a backup that could deliver a bare metal recovery to the prior state. And that has to be complete without exemptions.

Less important are selective backups, but they could be useful in the long run. The FP2 carries a slot for SD cards, and I have 128 GByte in there, with > 60 GBytes free.

So for ease of use AND performance I think a backup onto the memory card would be the best way to do. Those can then be later copied onto the PC either with the file transfer or adb.

On Linux there is Timeshift which only makes delta backups (only what has changed) so even several dozens of backups wonā€™t fill up your mass storage ā†’ You can run this for a considerable amount of time with no external storage whatsoeverā€¦

Thanks for any help.

Yours
hman

1 Like

Iā€™m not sure thereā€™s an elaborate guide here.

But in your case Iā€™d recommend:
1.) connect your device (FP2) via USB cable to your linux box and copy all internal memory files to your PC (you might as an alternative copy all internal memory - /data/media/0 - to your SD card).
2.) Start your device using TWRP (see #twrpwoflashing )
3.) Use the ā€œbackupā€ button within TWRP to create a full backup of the entire device data (and configure your SD card as destination for the backup)

That should be sufficient.

1 Like

Hi,

I had to use a backup twice from my fp2 : to update it to lineage os 18, and another time to switch to the fp4.
I do it mostly manually, but when the plan is clear, it is not that harmful.

If I donā€™t forget something :

  • photos/video : I did a backup on a synology nas.

  • application installation : I list all the packages, and reinstall it manually from fdroid, aurora, etc.

  • Some apps provide a backup feature in their settings : antennapod (all database), freeotp, k9 mail, osmand, signal (or other sms apps), twidere
    I stored the file in my nextcloud instance (from zaclys provider). This solution make it super easy to push/pull file in the new install.
    It takes ~ 50MB.

  • Some apps, when using the sdcard (in slot), can use the same data right away. osmand for example. So I would recommend not to touch sdcard data, and try for each apps.

  • Some apps provide integrated online backup (for example : fennec and firefox sync)

  • for contact and calendar, notes : I use DAVx5 to sync on my nextcloud instance.

  • all apps account reconnection : I use KeePassDX to store my passwords. So is is not that painful to reconnect all your accounts.

  • some apps need specific action : for ā€˜Signalā€™, there are backup key to keep in order to connect with your new install. So I would recommend to check backup strategies for each app before the new install.

I would add that /e/os make it super easy to resync data as the account management in settings app. Example : no need to reinstall and configure DAVx5.

I hope this will help.

1 Like

Thank you both!

For the moment, I did find that on FPOS root priviledges arenā€™t actually hard to get, the developer options are readily available without the four tapps etc, just in settings/developer options.

This way, with root access enabled for apps, I could launch OandbackupX, but I definitely do not want to have root access permanently enabled for security reasons. This of course also finishes the ā€œbackup in backgroundā€ thing in OandbackupX, but I can live with manually starting a backup. Itā€™s just a bit awkward having to enable root access prior to that, and disabling it right after. But it would be easier than having to reboot the phone into TWRP, which is why (if I recall correctly) have stopped doing that at one point in the pastā€¦

The issue remaining is: Can I trust OandbackupX to be able to perform a bare metal recovery, if upgrading FP Open OS fails?

That is the beauty of making backups (on Linux) with dd to my preferred external hard disks in a SATA docking station: Every bit gets copied. When you mount the copy, and the data is there, then itā€™s there. Definitely. Nothing hidden. If you see it, itā€™s thereā€¦

And on Linux making MD5 checksums is a cinch. With those you can, at any later point in time, check the integrity of your copy by simply running md5sum against the checksum fileā€¦

ā€¦ which, in return, can create difficulties if hard disk fails and you need to restore to a different disk. ReaR addresses such things.

Back to FP2: I find a combination of the suggestions of @Volker and @tgg best. In former times of Oandbackup I thought it was not able to do a bare metal backup and restore, but I may be wrong. If you get further experience with OandbackupX, you might share it here.

Do I understand it correctly that you can start OandbackupX as root from a terminal shell from Linux after enabling debug mode or how do you manage to temporarily enable root and start backup manually?

Actually, since the introduction of Large Block Adresses, problems with restoring to a different HDD donā€™t exist anymore. As long as your new disk is bigger than the old oneā€¦ You just waste some space, but that can be cured by enlarging your partitions with gpartedā€¦

Back to the FP2: Out of curiosity, and not knowing how much I can trust OandbackupXā€™s capability of performing a bare metal recovery (should that become necessary) I wanted to go down two paths: One with OandbackupX and one with TWRP. But that seemingly doesnā€™t reside in the phone anymore? Booting the phone with vol up + power just gives me a dialog to reboot, reboot to bootloader, update options, wiping options etc.

From that only ā€œReboot nowā€ works, which obviously just reboots. But selecting ā€œReboot to bootloaderā€ reboots the phone, vibrates a couple of times and then only displays the Fairphone logo and thatā€™s it. And the LED blinks in blueā€¦ Nothing else happeningā€¦ To get out of this, I have to pull the batteryā€¦

Regaring OandbackupX: I simply enabled root access for apps (only for apps) in Settings | System | Advanced | Developer Options. Then I could start OandbackupX just from the launcher by tapping itā€™s iconā€¦ I was asked whether I want to grant root access to OandbackupX, which I confirmed, and then OandbackupX just started, seemingly normal. Some settings had to be made, obviously some kind of wizard running.

So far I havenā€™t actually performed a backup with OandbackupX. I actually donā€™t want those to be done in the background (for security concerns if root access is on longer than necessary), but rather in the foreground.

1 Like

Just long press the power button (about 15s) to reboot (or connect your linux machine via USB and type fastboot reboot :wink:

No. AFAIK even for FPOOS TWRP was again replaced by another recovery.
But as I mentioned above - itā€™s not diffiicult to start TWRP (explanation can be found in link twrpwoflashing ). Well, you can also flash it using fastboot if you wantā€¦
Using a tipatched TWRP version you might even create a complete ā€œbare metal backupā€ including internal storageā€¦

As youā€™ve root available with FPOOS you might also use Titanium Backup. For me it has always worked well.

I have now performed a backup with OandbackupX (in the foreground, to SD card). It took about 13 mins, that is acceptable. Seemingly no errors. But Iā€™ll run a verify against it, to be sure.

Thanks. Long pressing power does workā€¦

TWRP has been replaced by another recovery? There is only ā€œReboot to bootloaderā€, but that, as I wrote, doesnā€™t do anything besides making the LED blink in blueā€¦

Regarding Titanium, I have read reports that only the paid version of Titanium would be able to really backup everything, including SMS. I donā€™t mind if good software has a price tag, but I like to know that itā€™s worth the money before spending itā€¦

After reading a while in the help section, maybe upgrading isnā€™t that good an idea after all, some users complain about instability of Android 10 on Fairphone, both Android and FP OOS, and users compare that to the instability of Android 9 the< experienced.

I see some apps crashing on Android 9, too (notably Quickstocks, Corona Contact Tracing Germany and Warnapp Companion).

Reboot to bootloader reboots into dic:fastboot mode - and fastboot mode is signalled by LED blinking in blueā€¦

Canā€™t say. Backup of SMS was no main focus of mine. You may use MyPhoneExplorer if needed.

Regarding fastboot: Thanks for the link to the guide. The guide cannot be commented. The info needs updating: On my Linux (Mint 19.3 Tricia a.k.a. Ubuntu Bionic Beaver) Synaptic says that android.tools.fastboot is a transitional package, there is another package with exactly the same version and build number, that uses the simplified name ā€œfastbootā€. And that has the description ā€œAndroid fastboot toolā€.

I did not read all the details, but I can fully recommend OABX.

Last week I wiped my FP2 and installed 18.1. After that I restored all my apps with OABX.
I didnā€™t had any issues except the closed source apps from playstore (I installed via Aurora).
I have to say that I donā€™t have any google services installed and the apps which use the keystore (see FAQ for examples) cannot be restored or you can try and you will need to login again afterwards. (for me these are only the Messenger Signal and Threema)

I would also suggest to join the Telegram channel (also possible via Matrix [Bridge] ā†’ GitHub - machiav3lli/oandbackupx: backup manager for android ) if you have any detailed questions and maybe the FAQ will help you as well. oandbackupx/FAQ.md at main Ā· machiav3lli/oandbackupx Ā· GitHub

In the chat you will also get the latest dev/test builds (the main dev called them ā€œneoā€ and another dev which improved a lot in the last month release his own build which address special issues - pumkin release) ā†’ there releases are attached to the channel.
I can tell that these latest builds are already more stable in regards schedules backups, fix some issues with file-systems links during restore and they support special backups now - like WIFI access points + SMS/MMS + Bluetooth ā€¦
I would attach the latest neo here, but it is not allowed to attach apks.

Anyway. Summary: Iā€™m really happy that OAB has such a great successor. :wink:

2 Likes

Regarding the APK of closed source: I would recommend to set Aurora (as well as F-Droid) to ā€œkeep APKā€. That way you never have to backup APKs, just every now and then you should copy the APK, that will pile up, to your PC, after which you can safely delete them on the phone. This method also comes handy when you have to downgrade certain apps, sometimes older versions will be no longer available for downloading!

1 Like

Thanks for the hint. Maybe I was not precise enough. APK restore also worked fine for all the playstore apps with OABX. Just the data restore ran into errors.

Maybe your data errors come from the default setting of OandbackupX to not backup the app cachesā€¦ This can be changed in the settings.

I found another shortcoming of OandbackupX: It seems to lack a verify function, at least I couldnā€™t find oneā€¦

Itā€™s a wiki. You should be able to update it.

No it was not about the cache. I talked with the dev about it in the Telegram chat.
It was also possible to fix some by just skipping some data types (external, device protected, etc.). As explained there is some stuff in the current stable they already fixed in the v8 alphas. (links in to files in the data directory of apps and so on, some errors with broken epipe, etc. Iā€™m not a developer so I can not explain it better).

Can you explain a bit more, what you mean with ā€œverify functionā€?

This is not a thread about OABX, so I would recommend to share your thoughts/needs/requirements/ideas to the devs directly. If you donā€™t use Telegram or Matrix, you can alsoopen an issue in github: Sign in to GitHub Ā· GitHub

Uh, yes, true. But why is the only way to add info to edit it? The fact that the package android-tools-fastboot got marked ā€œtransitionalā€ means that the process of migrating to the new, simplified, name ā€œfastbootā€ isnā€™t finished yet. And on other Linux distros the picture might be different altogether, therefore I thought a comment would be more appropriate than an editā€¦

thats the nature of a wiki. No comments, but just one topic with all edits. So whatever you want to add, add it in the post, by removing outdated information or just adding comments as addition.

1 Like