> For the complete documentation index, see [llms.txt](https://docs.primeur.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.primeur.com/data-watcher-1.20/troubleshooting/data-watcher-mongodb-scripts/restore-the-data-watcher-mongodb.md).

# Restore the Data Watcher MongoDB

To restore the Data Watcher database 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 `dwrestore.sh` script.
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](/data-one-installation-manager/cli-and-configuration-files/dataone.sh-reference.md) page.

The script to restore the Data Watcher database is stored at this path:\
`$DATAWATCHER_HOME/mongodb/backup`

The `dwrestore.sh` script restores info into `$MONGODB_LOG_DIR/dw-restore.log`

You will be asked to confirm the restore operation.

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

Example:\
`./dwrestore.shdestination-path/dw-<datetime>/dw`
