Skip to main content
Skip table of contents

Backup and restore

Manual backup process

PostgreSQL

This requires direct access to the PostgreSQL server from the machine on which the backup is done:

BASH
PGPASSWORD=<password> pg_dump -O -h <hostname> -U <username> <dbname> > <date>.sql

InfluxDB

The command for backing up the InfluxDB is the following:

CODE
influxd backup -portable -host <hostname>:8088 -database <dbname>

Manual restore process

Hibernating the Tenant by adding the option `hibernate: true` to the tenant's global configuration section and reapplying the tenant configuration:

CODE
global:
  name: ...
  hibernate: true

  ...

... 

This config can then be applied with the following command:

CODE
helm upgrade -f <tenant-name>.yaml <tenant-name> <chart>

After a few moments, use kubectl again to check if the tenant is fully hibernated:

CODE
kubectl get pods -n <tenant>

There should not be any pods left in the tenant (evicted pods can be ignored). Once the tenant is fully hibernated, the databases can be restored.

Restoring PostgreSQL

First ensure that the schema is cleared and any existing (possibly corrupted) data is deleted:

CODE
PGHOST=<host> PGPASSWORD=<password> PGUSER=<user> PGDATABASE=<dbname> psql -qAtX -c "DROP SCHEMA IF EXISTS %s CASCADE;"

Then, the actual backup can be applied:

CODE
PGHOST=<host> PGPASSWORD=<password> PGUSER=<user> PGDATABASE=<dbname> psql -f <filename>

Restoring InfluxDB

For restoring influxdb, simply run:

CODE
influxd restore -portable -host <hostname>:8088 <backup-dir>

Dehibernating the tenant

Remove the `hibernate=true` section from the config file again and apply the tenant's configuration again (see above for specific steps).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.