Backup and Restore#
The Enterprise Solid Server (ESS) uses a PostgreSQL database to store
Resource Description Framework (RDF) data and non-RDF data. By default,
ESS stores data in a database named ess
.
Prerequisites#
The following examples assumes the use of PostgreSQL environment variables for the various connection settings:
Note
Alternatively, you can specify command-line connection parameters instead.
Set the following PostgreSQL environment variables:
PGHOST
for the database server hostname.PGPORT
for the database server port (default5432
).PGDATABASE
for the database name (defaultess
).PGUSER
for the username.
Set the user password in a password file.
Refer to the your configuration settings to determine the values used for your deployment.
Backup and Restore the ESS Database (pg_dump
/psql
)#
- Backup using
pg_dump
For PostgreSQL database, you can use the
pg_dump
command-line tool to extract the content of the specified database.For example, to dump the ESS database named
ess
, you can usepg_dump
with a compression tool to create a compressed database dump filebackup.2020-11-30.sql.gz
:pg_dump ess | gzip > backup.2020-11-30.sql.gz
- Restore using
psql
For PostgreSQL database, you can use the
psql
command-line tool to restore the ESS database from the dump files. You can usepsql
with an unzip tool to restore from a compressed dump filebackup.2020-11-30.sql.gz
:gunzip -c backup.2020-11-30.sql.gz | psql ess
For information on PostgreSQL database backup/restore, refer to the PostgreSQL documentation.