2023.2.2 upgrade database migration fills up HDD, corrupts DB

Like many users, my database migration never finishes, because the ever increasing DB-WAL file reaches the disk space limit and the main database gets renamed ‘corrupted’.

Is there a way to make it finish?

Surely if there is a requirement for double the storage space to migrate the database, this should be a warning?

My database is 55gb, yes i know it’s massive etc etc. Performance is great however and it’s a year of data I want to keep.
I’ve resisted splitting the databas because it’s too much work. I threw money at proper hardware so I don’t have to mess around with different DBs and maintaining updates to separate DBs etc.

Once the system fills up, the old database is renamed ‘corrupted’ and a fresh one is started.

I took this database off, ran a full integrity check with DB Browser (SQLite) and it’s saying the DB is clean.
Seems like the issue is with HA not splitting the migration into chunks and expecting there to be enough free space for a whole 2nd copy of the DB.

I know this isnt the solution, but in real terms, thats still a tiny amount of storage. Do you have any options to simply increase your storage capacity ?

Thanks Rofo,

I was able to allocate a bit more space for it: another 50gb, so it should have enough to replicate it or do what it needs to.
The wal file has increased up to 40gb and it seems to be settled. Not sure if anything is happening but the CPU and RAM usage is high, and the ‘accessed’ time seems to be incrementing, so finger’s crossed it sorts itself out overnight.

Looks like it did finish and all my data is back, yay :slight_smile:

Had to delete and re-put the original DB back in the config folder a couple of times after it had stopped and given up. Each time I made sure Recorder was disabled, clean boot and leave it be.
It got there eventually. A notice would sure be nice that there needs to be up to 2x the space available for the migration.

What if I missed the notification that tells me about not to restart the system until it finishes upgrade and I started the OS upgrade process which ofcourse restarts the system after a while?!

I’m still waiting for the database upgrade to finish - if it ever will - and it’s still in the “growth” fase, but after how long should I start panicing and cursing myself for making this reckless action?

UPDATE:
after 40ish minutes finished and it seems it has fcked up all my historical sensor data, I mean I get impossible readings like outdoor humiditiy has been always around 20-25% and such…

how can it be corrected?