Restoring Your Scalingo for PostgreSQL® Dedicated Resources Database
Dedicated Resources PostgreSQL® databases are automatically backed up and can be restored to a specific point in time within the backup retention period, depending on your plan.
You can restore your database either from a managed continuous backup, or from a customer-provided dump.
Restoring from a continuous backup
Point-in-Time Recovery is a fully managed restore operation available from the database dashboard.
Using the Database Dashboard
- From your web browser, open your database dashboard
- Click the Backups tab
- Locate the Point-in-Time Recovery block
- Click the Start a PiTR button
- Pick a timezone, then a date and time (default timezone is your browser timezone)
- Make sure to check the I understand that this action will permanently delete existing data and cannot be cancelled or undone once started. checkbox
- Validate by clicking the Confirm button
Restoring from a customer-provided dump
On Dedicated Resources, dump restore is a client-managed operation.
You must connect to the database yourself and run standard PostgreSQL® tools
(pg_restore, psql).
You can run the restore from your local or development environment. In both cases, you must configure the Dedicated Resources firewall to allow connections from your chosen source before running the restore.
From Your Workstation
- Make sure your source IP (or range) is allowlisted in the database firewall
scalingo database-firewall-rules-add my-dedicated-db-id --cidr 203.0.113.0/24 --label "Office network" # or directly the public ip of the workstation: scalingo database-firewall-rules-add my-dedicated-db-id --cidr <public IP>/32 --label "My workstation" # wait for the database to be reachable from workstation - Get the database connection URI
SCALINGO_DB_URL=$(scalingo --database my-dedicated-db-id env-get SCALINGO_POSTGRESQL_URL) - Restore the dump:
pg_restore --clean --if-exists --no-owner --no-privileges --no-comments --dbname "${SCALINGO_DB_URL}" <dump_file>