Deployment Guide
Maintenance
This chapter explains about the backup details for the database..
Database backup
Stop Tomcat Service before taking a backup of the database. Tomcat Service is identied as “Dell WMS: Tomcat Service” and must be
stopped from Local Services.
The following command will dump the contents of the MongoDB.
mongodump --host <mongodb_host> -u stratus –p <db_password> --db stratus --out ".\wmsmongodump"
The following command will dump the contents of the MarioDB.
mysqldump --routine –h<mariadb_host> -ustratus –p<db_password> stratus > ".\wmsdump.sql"
Database restore
Stop Tomcat Service before restoring the database. Tomcat Service is identied as “Dell WMS: Tomcat Service” and can be stopped from
Local Services.
The following command will restore the MongoDB. You must run the following command from the wmsmongodump directory – parent
directory of stratus database.
echo "db.dropDatabase()" | mongo -u stratus -p <db_password> --host <db_host> stratus mongorestore --host <db_host> -u stratus -p
<db_password> --db stratus ".\stratus"
The following command will restore the MarioDB. You must run the following command.
mysql –h<db_host> -ustratus –p<db_password> -e"drop database if exists stratus; show databases;"mysql –h<db_host> -ustratus –
p<db_password> -e"create database stratus DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;show
databases;"mysql –h<db_host> -ustratus –p<db_password> stratus < .\wmsdump.sql
7
Maintenance 25