pg_snap adds support for PostgreSQL database snapshots. Snapshot the database before making changes to the schema or data, and restore it if something goes wrong.
- PostgreSQL installed and running
- Bash shell
sh -c "$(curl -fsSL https://raw.githubusercontent.com/iseth/pg-snap/master/tools/install.sh)"To use pg_snap, follow the steps below: Run the script with the desired command and options. Available commands are:
-lor--list: List all available snapshots.-cor--create: Create a new snapshot.-ror--restore: Restore a snapshot.-dbor--db-name: Set the name of the database to work with.-vor--version: Display the script version.
Example usage:
./pg_snap -db statecert_development --list
./pg_snap -db statecert_development --create
./pg_snap -db statecert_development --restore
This project is licensed under the MIT License.