Skip to content

Manual Recovery

Preferred method is using ogion itself - see CLI Reference.

If you need to restore manually without ogion, follow the steps below.

Recovery Process

1. Download Backup

Download the backup file from your cloud provider (GCS, S3, Azure).

2. Decrypt with age

You need the age private key that matches the public key used during backup.

1
age -d -i /path/to/key.txt -o backup.sql.lz backup.sql.lz.age

3. Decompress with lzip

1
lzip -d backup.sql.lz

This produces the final backup file (e.g., backup.sql).

4. Restore Based on Type

PostgreSQL

Restore using psql:

1
psql -h localhost -p 5432 -U postgres -d database_name < backup.sql

MariaDB

Restore using mariadb:

1
mariadb -h localhost -P 3306 -u root -p database_name < backup.sql

File

Copy the file back:

1
cp backup_file /destination/path

Directory

Extract the tar archive:

1
tar xf backup.tar -C /destination/path --strip-components=1