To get data back from a backup, restore a snapshot. The restore creates a new database that holds the data from that snapshot. The database the snapshot came from stays as it is. You can compare the two, copy back what you need, or switch your applications over to the new one.
Before you begin
Section titled “Before you begin”- A snapshot in the Completed state. See Take a snapshot of a database.
- The create permission for DBaaS in the project. See TIR Access Control.
The source database can be in any state, including Stopped.
Restore the snapshot
Section titled “Restore the snapshot”- On the source database’s details page, open the Snapshots tab.
- Open the snapshot’s row menu and choose Restore.
- In Restore Snapshot, enter a Database Name for the new database. The suggestion is the
source database’s name followed by
-restore. The name follows the same rule as any database name. It has 3 to 50 characters of lowercase letters, numbers and hyphens, starts with a letter, and ends with a letter or number. It must be unique in the project. - Select Restore.
TIR starts the restore and opens the new database’s details page. The new database shows Creating until it is ready, like any new database, and then Running.
What the new database keeps
Section titled “What the new database keeps”The restored database has:
- The data, databases and users that were in the snapshot.
- The source database’s plan, PostgreSQL version, region and storage size, as they are when the restore starts.
- The source database’s admin password, as it is when the restore starts.
A restored database is a separate database with its own price. See pricing.
What you set up again
Section titled “What you set up again”These settings stay with the source database:
- The IP allowlist starts empty, so the public endpoint opens only once you add an IP range.
- The VPC, the parameter group, and the snapshot schedule start unset.
Once the new database is Running, set them up:
- Add the IP ranges your applications connect from, and attach a VPC if they connect privately. Edit Database saves an update only when the allowlist has at least one range, so add a range even if you plan to connect only through the VPC. See Control network access to a database.
- (Optional) Attach a parameter group. See Use parameter groups.
- (Optional) Set a snapshot schedule. See Schedule snapshots of a database.
Check the restore
Section titled “Check the restore”The restore is recorded on Activity Timeline of both databases. The source database shows “Snapshot restored”, with the snapshot and the new database’s name. The new database shows “Database created (restored from snapshot)”, with the source and the snapshot.
When the new database is Running and has an IP range, connect to it and check your data. See Connect to a database. When you have finished with the source database, you can delete it, but its snapshots go with it. See Delete a database.