Skip to main content

Backing up and Restoring the Vaultwarden SQL DB

Postgresql databases

Configure database connections in pgAdmin​

run the tcdbinfo.sh  script to see the connection details for both the old and the new database, and set them up in pgAdmin.

tcdbinfo PG Admin Connect

Create database Backup​

In pgAdmin, right click vaultwarden->Databases->vaultwarden and click Backup.... Give the file a name (e.g. vaultwarden.sql) and click Backup.

PG Admin Select Backup PG Admin Backuo

Restore database backup​

In pgAdmin, right click testwarden->Databases->vaultwarden and click Restore.... Select the sql file (vaultwarden.sql).

PG Admin Restore PG Admin Restore

On the 2nd tab page, select the first 3 options (Pre-dataData and Post-data). On the last tab, select Clean before restore. Now click Restore.

PG Admin Restore PG Admin Restore