Easy roll-back in case of update issues (Ubuntu/Debian only?)

There’s quiet a few forum posts from people who get into trouble when updating chia versions.

On Ubuntu I just realized that there are two ways to install/update chia, a .deb ‘one-click’ installer from the Chia website and the CLI instructions on github: INSTALL · Chia-Network/chia-blockchain Wiki · GitHub

Both install into separate directories, but when running use the same config/db/keys directories (~/.chia/mainnet/…).

Assuming these config/db/keys formats and files don’t change between versions, one can have two instances of Chia installed at the same time and run both, not at the same time of course but alternating, missing few challenges depending how fast you can terminate instance A (CLI installed) and start instance B (the .deb installer from the website).

(Of course A and B versions would both need to use the passphrase introduced in 1.2.10, or neither should).

This could provide a very easy and fast roll-back option in case an update goes haywire.

Say one is running instance A with version x and an update to x+1 is wanted, you could stop instance A, reboot to make sure all processes are really stopped, make local .bak backups of the database and wallet directories just to be sure and then update instance B to x+1. Run it and in case of problems restore the database and wallet directories and run instance A with the old and proven version x.

Windows and Mac OS only feature installers as far as I know so this would only be useful on Linux?

I’ll try this tomorrow but only after cloning my OS disk;-)

Does this make any sense at all or have I missed some corners already and can I same myself the time … ?

I’m on Debian, to upgrade I always follow the CLI instructions from github, but instead of ‘upgrading’ I install fresh every time:

  1. I delete the chia-blockchain folder (NOT the .chia folder which contains the config/db/etc)
  2. I then follow the new install instructions

It has always worked flawlessly for me. I’ve started doing this as trying to actually upgrade ended up in janky results for me a couple of times.

Where I’m going with this is you can:

  1. Rename the existing chia-blockchain folder to chia-blockchain-backup or w/e
  2. Follow the new install instructions.
  3. If fail, delete the new chia-blockchain folder and rename chia-blockchain-backup back to what it was.

Note: I haven’t actually tried reverting as described above because I haven’t needed to, but I see no reason why it wouldn’t work.

That… would be a bit more simple indeed :crazy_face:

Up till now i always upgraded per the CLI instructions, no problems so far.
But just watching the chia-grass grow got a bit boring so i thought let’s try something new, haha.
Guess I could try some forks, will look into that then.
Thanks and have a nice day!

1 Like