Link Search Menu Expand Document

Backup and Restore PostgreSQL Databases

Table of Contents

Elastio supports PostgreSQL database backup and restore in the Elastio CLI. PostgreSQL restore is not available on Windows for the time being, but Windows support is planned for the upcoming versions.

Backup a PostgreSQL database

Run this command to create a full database backup that we will restore in further examples.

Note: If the password contains special symbols it should be wrapped in ‘ like so: ‘password’.

elastio postgres backup --database <db-name> --user <user-name> --password <password>

An example output can be viewed below:

Ingested 198.86MB in 2 item(s) in 1 minute (2.18MB/s, 130.62MB/m)
New: 198.86MB (2.18MB/s, 130.62MB/m)
Existing: 0B (0B/s, 0B/m)
Skipped: 0B (0B/s, 0B/m)
Recovery point ID: rp-01gjmnz4748qbqnh7wqmbwzfyr

Restore the PostgreSQL database

Use the recovery point ID for the database you are willing to restore:

elastio postgres restore --rp <recovery-point-id> --user <user-name> --password <password>