HomeGuides
Log In
Guides

Back up the Data Watcher MongoDB

Data Watcher has two Databases: ‘be’ and ‘dw’.

To back up the Data Watcher DBs follow these steps:

  1. On each node where Data Watcher is installed, stop Data Watcher (dataone.sh stop DW).
  2. On each node where Data Watcher is installed, start MongoDB (bin/mongodb start).
  3. On just one node of your choice among the ones where Data Watcher is installed, launch the two backup scriptsbebackup.sh and dwbackup.shin sequence.
  4. On each node where Data Watcher is installed, start Data Watcher (dataone.sh start DW).

Need details about start and stop commands? Have a look at the dataone.sh reference page.

The two scripts to back up the Data Watcher DBs are stored at this path:
$DATAWATCHER_HOME/mongodb/backup

The scripts are:
bebackup.sh: it logs backup info into $MONGODB_LOG_DIR/be-backup.log
dwbackup.sh: it logs backup info into $MONGODB_LOG_DIR/dw-backup.log

Usage:
./bebackup.sh destination-path ./dwbackup.sh destination-path
destination-path is the folder where the backup will be generated and it must exist.

Under destination-path, the following folders will be created:
be-<datetime>/be dw-<datetime>/dw
In case the backup fails, these folders will not be created.