Restore PostgreSQL from a backup¶
Aiven for PostgreSQL databases are automatically backed up and can be restored from a backup at any point in time within the backup retention period, which varies by plan. The restore is created by “Forking”: a new PostgreSQL instance is created and content from the original database is restored into it.
Aiven for PostgreSQL doesn’t allow a service to be rolled back to a backup in-place since it creates alternative timelines for the database, adding complexity for the user.
To restore a PostgreSQL database:
Access the service detail page of the PostgreSQL database
Click on the “New database fork”
Enter a service name and choose a project name, database version, cloud region and plan for the new instance
- Select the “Source service state” defining the backup point, the options are
Another point in time - the date selector allows to chose a precise point in time within the available backup retention period.
Once the new service is running, you can change your application’s connection settings to point to it.
Forked services can also be very useful for testing purposes, allowing you to create a completely realistic, separate copy of the actual production database with its data.
Manual restoration should only be necessary when data is accidentally corrupted by the pointing applications. Aiven automatically handles outages and software failures by replacing broken nodes with new ones that resume correctly from the point of failure.
The Hobbyist service plan does not support database forking, so you have to use an external tool, such as
pg_dump, to perform a backup.
To perform a manual backup, see Create manual PostgreSQL backups.