supermarket icon indicating copy to clipboard operation
supermarket copied to clipboard

Document backup and restore steps

Open robbkidd opened this issue 7 years ago • 8 comments

Document backing up database and cookbook artifacts, particularly when running DB and artifact storage locally on the Supermarket host. A solid summary of the steps was provided recently by Mikhail Zholobov on #1392.

robbkidd avatar Aug 31 '16 15:08 robbkidd

A more complete command to perform the pg_dump if you used the omnibus version of the supermarket cookbook would be:

/opt/supermarket/embedded/bin/pg_dump supermarket -h localhost -p 15432 -c -f supermarket.sql -U supermarket

polliard-jmfe avatar Sep 13 '16 11:09 polliard-jmfe

This is what I am using to do a backup and restore. The backup gets written to an S3 Fuse mount.

There is still more work to do, but I tried to mirror it after the chef-server-ctl backup/restore pattern.

Just for reference when writing the docs of the steps to do it from a fresh machine and not an upgrade.

backup-restore-scripts.zip

polliard-jmfe avatar Sep 13 '16 14:09 polliard-jmfe

@polliard-jmfe Thanks for the scripts!

Just for reference when writing the docs of the steps to do it from a fresh machine and not an upgrade.

What are the differences you've found between a fresh install and an upgrade that affects backup/restore?

robbkidd avatar Sep 13 '16 14:09 robbkidd

None, directly, but in the previous ticket, it appears that the user was changing from one cookbook to install supermarket to a different cookbook. The only other thing was.. while a cookbook should be managing and updating the configuration, on several of the chef products they also backup the /etc/product path. I didn't restore the /etc/supermarket path because we ARE keeping our cookbook configuration in sync with our desired configuration on supermarket. I made the distinction perhaps for no cause, rather, I was trying to be clear. Our backup and restore is really for "oh my god, aws is on fire, and our systems are down" :)

polliard-jmfe avatar Sep 13 '16 14:09 polliard-jmfe

Yep. My default is to expect the configuration is already under version control and that backup is about the data (database and cookbook artifacts).

robbkidd avatar Sep 13 '16 14:09 robbkidd

And thanks again for the scripts. This has me considering at least a supermarket-ctl backup command. 🤔

robbkidd avatar Sep 13 '16 15:09 robbkidd

No, problem, got to find someway to help the community.

polliard-jmfe avatar Sep 13 '16 16:09 polliard-jmfe

bump

vinyar avatar Apr 26 '17 21:04 vinyar