Restore freedombox backup, from Debian 12 to Debian 13

It looks like the btrfs file system on the microSD card of of my Pioneer is broken beyond repair, so I need to reinstall and restore a backup.

Would it work to wait until Debian 13 is out, make a fresh installation based on Debian 13 and restore the backup, although it was done with Freedombox running on Debian 12? I have backports activated.

On this Pioneer, the only thing I really want to restore is shaarli.

Boot read-only and try btrfs scrub. You may need several runs until it comoletes without complaints.

Boot off of a usb image if you can’t boot and try that.

I have put the microSD card in a reader on my PC, scrub says no error but btrfs check has a massive number of errors, and if I try with --repair it says it can’t do anything. I made a copy with ddrescue, but I don’t think this is that useful.

I had the idea to look at this because I saw I/O errors in the journal. Anyway, reinstall looks like the way forward.

I think as a general rule you want to restore to the same Debian release you backed up from, but in practice it probably depends on the app being restored and how compatible the app version in the new Debian release is with the app version in the old Debian release.

I/O errors and Btrfs errors are likely due to SD card failures. Best to change the card too before reinstall.

This is an expected scenario when we implemented backups. However, we have not fully tested backup on Debian 12 and restore on Debian 13 yet. It is likely to work well.

Debian 13 has been released and we will build FreedomBox images for it soon. But I don’t seen an disadvantage to installing Debian 12 and upgrading it to 13. Distribution upgrade can be manually done from System →Software Update → Distribution Update.

2 Likes

Best to change the card too before reinstall.

Then see BTRFS Filesystem Maintenance Automation with btrfsmaintenance Package to enable automatic btrfs trim to reduce SD card wear and tear.

2 Likes

At last for shaarli, it worked. Given the state of my other freedombox (email and ejabberd non-functional), I may have to try this very soon for postfix/dovecot, ejabberd, radicale and quassel.

I made a fresh Trixie installation on a rockpro64 with a USB SSD, installed freedombox in command line, then I after all setup was complete, I joined my domain, recreated the users and restored cotrun, ejabberd, radical and quassel, that from a backup made on Bookworm. It worked fine.

For email, I am still not sure what to do. When I tried restoring email before, dovecot wasn’t functional, so I am stuck there.

Hi @Avron ,

Could you please ensure that you are on latest FreedomBox 25.9.3 (if installing email on Trixie without restoring from backup works, then you already on the latest version). Then after restoring from backup, please ‘Re-run setup’. If this does not work, I can help you debug further.

Thanks.

I went the easy way:

  • I use gnome evolution as email client, with local synchronization configured, so I have a local copy of each IMAP folder. To keep this, I did set evolution to be offline, created a local folder for each IMAP folder, and copied all emails to the local folder (select all emails in the folder, right-click, copy to, select destination).
  • I installed postfix/dovecot without restoring.
  • I re-created the IMAP folders and for each, copied back all emails from the local folder.

This means one operation for each IMAP folder of each account, which is a little tedious if you have many of those, and one needs to be sure to have configured the local sync of all folders for all accounts, but it has the benefit to be easy to understand and apply, and pretty reliable.

What I’ll remember: if you have problems with some app, reinstalling and restoring will also restore the problems (I also have this with wrong certificate for Quassel for several years after having changed domain once).

So if one has an easy backup by some other software, and could copy back the data, it may be a good idea to not restore the app, in order to have the app in a fresh clean state, and then copy the data back.

1 Like