Pryv.io Backup

This guide describes how to perform a backup of your Pryv.io platform and how to restore it in case of any data loss. You will have to backup user data as well as configuration files of each role: core, register, static-web.

We will refer to the root of your Pryv.io installation on each role (usually /var/pryv/) as ${PRYV_CONF_ROOT}.

Table of contents

  1. Backup
    1. Core
    2. Register
    3. Static-web
    4. Important notice
  2. Restore
    1. Core
    2. Register
    3. Static-web

Backup

You should first backup core data, starting with MongoDB.

Core

docker exec -t pryvio_mongodb /app/bin/mongodb/bin/mongodump -d pryv-node -o /app/backup/

The backup folder will be located at: ${PRYV_CONF_ROOT}/pryv/mongodb/backup/.

docker exec -t pryvio_influxdb /usr/bin/influxd backup -portable /pryv/backup/

The backup folder will be located at: ${PRYV_CONF_ROOT}/pryv/influxdb/backup/.

Register

Static-web

Important notice

During the time of the backup, if user accounts are created between the core and register backup times, they won’t be usable after a backup restoration. Attachments and High-frequency data created after the MongoDB backup won’t be accessible as their corresponding Pryv.io events will not be available.

Restore

Once you have backed up data, you can use it to restore your Pryv.io platform as described in the following procedure.

Core

docker exec -t pryvio_mongodb /app/bin/mongodb/bin/mongorestore /app/backup/
docker exec -t pryvio_influxdb /usr/bin/influxd restore -portable /pryv/backup/

Register

Static-web