Licio, Yes, you can make a backup using a snapshot given that you can assure it is an atomic operation across the entire PostgreSQL datafiles. What snapshot technology are you using and how is your datafiles layed out? If Postgres resides on a single volume and a snapshot is taken of that volume then the result would be a crash recovery backup. There is no need to run pg_start_backup() in this case nor can it be run on a replica. I’ve been doing this type of backups for a better part of decade with great success. The benefit is zero impact on the primary database and multiple backups can be taken throught the day to reduce recovery times in a large and high volume database. If you can’t guarantee an atomic operations across all the datafiles then you need to use a different method. i.e. shutdown the replica, take the snapshot backups, and start the replica again. |