In this tutorial, we will create a snapshot of the PostgreSQL database that has been deployed on Google Kubernetes Engine (GKE). We will then restore the database state using the roll back to a point-in-time snapshot feature.
Before starting with this tutorial, make sure ROBIN Storage is installed on GKE, and your PostgreSQL database is deployed, has data loaded in it, and the Helm release is registered with ROBIN.
Let’s run the following command to see the available snapshots:
You should see an output similar to the following. Note the snapshot id, as we will use it in the next command.
Now, let’s rollback to the point where we had 9 movies, including “June 9”, using the snapshot id displayed above.
To verify we have rolled back to 9 movies in the “movies” table, run the following command.
You should see an output similar to the following:
We have successfully rolled back to our original state with 9 movies!
This concludes the Snapshot PostgreSQL on GKE tutorial. We can also clone entire PostgreSQL database to improve collaboration across Dev/Test/Ops teams.