I have HAOS running on a Raspberry Pi 4 with an external 128GB M2 SSD connected via USB as data disk. This has been working well for a long time. Now I want to migrate to a new Raspberry Pi 5. Unfortunately, the database has grown so that a full backup is more than 25 GB tar file. I can accept loss of historical data.
What I really want to do is to create a fresh install on the RPi 5, transfer only the config over from the previous installation (but not the data) and then plug the USB disk cabinet into the the RPi 5 and mount it to have access to the historical data.
Is there some way to do this so I don’t have to manually configure every integration, but also not having to backup/restore a lot of data?
Sure. You could just delete the home-assistant_v2.db file on your rPi4. Then do a manual backup. Then restore that new backup to your rPi5 and you should be good to go. As you know, that is all of your historical data, so I would actually back that up somewhere. You can use any app that can read sqlite3 databases and still have access to it if you wanted it.
The other thing you could do is delete the database, then just transfer the /config directory over to your new installation and reboot it.
Thanks - I looked closer into this and discovered that most of the backup was actually an InfluxDB with lots of data I don’t use anymore. Deleted that and got a reasonably-sized backup.
Installed the RPi5 and restored the backup, then shut it down and connected the external storage. On startup it detected the data disk and offered to repair, which worked fine. I now have historical data available, and all add-ons and integrations appear to work so far.