Well, at least one alternative to performing these snapshots would be to use a tool like pg_basebackup or pgbackrest to perform the backups instead. At least with pgbackrest you can run a backup which pushes the data directly to s3 for storage (rather than having to use EBS volumes and snapshots..) and it can back up the stats and such from the primary, and then use a replica to grab the rest to avoid putting load on the primary's I/O. All of this without any of the PG systems involved having to be shut down, and it can handle doing the restores and writing the recovery.conf or creating the appropriate signal files for you, depending on the version of PG that you're running on (in other words, pgbackrest handles those version differences for you).
Thanks,
Stephen
Pgbackrest looks awesome. I like that it does it all, it deals with the WAL files, recovery.conf, etc. I’ll definitely have a look at it once we finish the migration to PG 14.
Thanks for the suggestion!
Lucas |