1.5 KiB
Using the PostgreSQL backend
Now supports PostgreSQL backend.
Because upstream Rclone image is based on alpine 3.16(and linux/arm/v6 platform is based on alpine 3.15), it only supports PostgreSQL 14 and previous versions, see Alpine 3.16 Packages and Alpine 3.15 Packages.
Environment Variables
DB_TYPE
Set to postgresql switch to PostgreSQL database.
Default: sqlite
PG_HOST
PostgreSQL host, required.
PG_PORT
PostgreSQL port.
Default: 5432
PG_DBNAME
PostgreSQL database name.
Default: vaultwarden
PG_USERNAME
PostgreSQL username.
Default: vaultwarden
PG_PASSWORD
PostgreSQL password, required.
The login information will be saved in the ~/.pgpass file.
Backup
Specify the above environment variables to switch to the PostgreSQL database.
Restore
When restoring, also specify the above environment variables to switch to the PostgreSQL database.
- Ensure that the database is accessible.
Perhaps you will use the docker-compose up -d [services name] command to start the database separately.
- Verify that the
PG_HOSTyou are using is accessible to.
If your database is running in docker-compose, you need to find the corresponding network name via docker network ls and add --network=[name] to the restore command to specify the network name.
- Restore and restart the container.