HomeGuides
Log In
Guides

Restore the Data Watcher MongoDB

To restore 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 restore scripts berestore.sh and dwrestore.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 restore the Data Watcher DBs are stored at this path:
$DATAWATCHER_HOME/mongodb/backup

The scripts are:
berestore.sh: it restores info into $MONGODB_LOG_DIR/be-restore.log
dwrestore.sh: it restores info into $MONGODB_LOG_DIR/dw-restore.log

You will be asked to confirm the restore operation.

Usage:
./berestore.sh source-path
./dwrestore.sh source-path
source-path is the folder containing MongoDB backup files (collectionname.bson files).

Example:
./berestore.sh destination-path/be-<datetime>/be
./dwrestore.shdestination-path/dw-<datetime>/dw