scrobble.life
HiveDevs

๐Ÿ If the server dies tonight: how the @hive3 witness would rise again

If the server dies tonight: the @hive3 witness disaster recovery plan ๐Ÿ—ณ๏ธ Vote @hive3 as witness

๐Ÿ If the server dies tonight: how the @hive3 witness would rise again

A witness is a promise. When people vote for @hive3, they trust that this little bee will keep signing blocks, keep the price feed fresh and not vanish the day a disk breaks.

Disks do break. Providers have outages. Sometimes a whole server simply doesn't come back. So this week I asked myself a boring but honest question: if the machine died tonight, how long would it take to rebuild everything somewhere else, and would I actually manage it?

The honest answer, until a few days ago, was "probably, with a lot of stress". Now it's a written plan, tested. Here it is, out in the open.

What gets saved every night

Every night, at a quiet hour and at the lowest priority (so the node never notices), the server makes one encrypted backup with everything needed to rebuild it:

  • ๐Ÿ”‘ the witness configuration, keys and node settings
  • โš™๏ธ all services, timers and scheduled jobs (the boring glue that makes a server work)
  • ๐Ÿ the scripts of the swarm: @beecounter, @scoutbee, @hive3.guard and friends
  • ๐Ÿงฑ firewall and SSH configuration
  • ๐Ÿ“‹ an inventory of how the machine is built: installed packages, running services, open ports, containers

The file is encrypted with AES-256 before it leaves the server. The passphrase lives on the server for the automatic runs, and on paper in my drawer. Without it, the backup is just noise.

What does NOT get saved (on purpose)

The blockchain itself. Block log and state are hundreds of GB, and they are public: anyone can download them again. On a new server the node is rebuilt from a public snapshot. Every big file the backup skips is listed in a small manifest, so on recovery day I know exactly what to re-sync and nothing gets forgotten.

Result: the whole backup is about 540 MB instead of hundreds of GB.

Two copies, far from the server

A backup that lives only on the same machine dies with the machine. So every night the encrypted file is copied to two different places outside the server:

  1. a cloud drive, keeping the last 14 days
  2. a private code repository, keeping the last 2

Plus the last 3 stay on the server itself, for quick "oops, I broke a config" moments.

Every night: 1 encrypted backup, 2 copies far away

The part most people skip: testing the restore

A backup you never restored is a hope, not a backup. So every Sunday a restore test runs on its own:

A backup you never restored is a hope, not a backup

  1. it downloads the latest backup from the cloud copy (not the local one)
  2. checks the checksum
  3. decrypts it
  4. checks that 17 essential pieces are really inside: witness config, services, scripts, firewall, the inventory...

And on its very first run it found a real hole. ๐Ÿ•ณ๏ธ One service kept its configuration inside a Docker volume, and the backup was skipping that folder. On paper everything looked fine. In real life, on recovery day, that piece would have been missing. Fixed the same evening, tested again: 17 out of 17. That alone was worth the whole exercise.

Recovery day, step by step

If the server dies:

  1. rent a new server, same OS
  2. download the latest backup and decrypt it
  3. install the packages from the inventory, put back configs, scripts and services
  4. sync the node from a public snapshot
  5. switch the witness to a NEW signing key on the new machine

That last step matters. The golden rule for any witness: never sign with the same key on two machines at the same time. If the "dead" server came back to life by surprise, it could produce duplicate blocks. With a fresh key, the old machine can't sign anything anymore, even if it wakes up.

What's next

A full fire drill: renting a small temporary server for a day, rebuilding everything there from the backup (with block signing switched off), measuring how long it really takes, then deleting it. When I have the numbers, I'll share them here.

If you run a witness or any Hive service and want to compare notes, or want the scripts, ask in the comments. ๐Ÿ

๐Ÿ”ฅ All rewards of this post go to @null (100% burn), as for all posts of the hive3 swarm for now.

Ant

๐Ÿ“Š Latest from the hive: Our Swarm Policy: how the hive3 bees vote, tag and guard, out in the open

๐Ÿ—ณ๏ธ Like the work? Vote @hive3 as witness ยท ๐ŸŽฎ Play BeeTris

๐Ÿ›ก๏ธ Want to help protect the hive? Bzzz, join the warrior bee swarm: follow the @pollenpatron downvote trail on PeakD

๐Ÿ๐Ÿค– Human + AI, honestly together: join AIBees, the hive for AI-assisted creators!


Comments ยท 3

  • @hivebuzz(74)ยท 1d

    Congratulations @hive3! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

    You received more than 2500 upvotes.
    Your next target is to reach 2750 upvotes.

    You can view your badges on your board and compare yourself to others in the Ranking If you no longer want to receive notifications, reply to this comment with the word STOP

  • @edje(73)ยท 1d

    Great approach and implementation. Honestly, I would've expected every witness to have a similar setup. But ok, I am in IT and Telecoms software/turnkey solutions for gazillion years where one will cut our arms off when we do not use backup and geo-redundancy concepts as a foundational element in architecture. Please don't forget to run restore tests regularly. Enterprises and corporations usually want to see this once or twice a year. This is for a good reason.

  • @fjworld(65)ยท 2d

    Good stuff.

    Glad I am not wasting my witness vote.

    As per...

    If you run a witness or any Hive service and want to compare notes, or want the scripts, ask in the comments

    I may be back on this one since I am thinking about the time and effort it would take if I explored this revenue stream.

    Testing fail safe operations is the tell all. So I appreciate what you shared ad per risk management best practices.

    My first risk challenge before I explore being a witness, is answering what will I and my business do if I and The PEPT Game players cannot connect too Hive blockchain?

    I suppose that would mean there are no operational witnesses? Could this be true?

    !PIMP !ALIVE !GLYPH