supermarket
supermarket copied to clipboard
Document backup and restore steps
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.
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
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.
@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?
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" :)
Yep. My default is to expect the configuration is already under version control and that backup is about the data (database and cookbook artifacts).
And thanks again for the scripts. This has me considering at least a supermarket-ctl backup
command. 🤔
No, problem, got to find someway to help the community.
bump