Deployment Guide
Table Of Contents
유지관리
이 장에서는 데이터베이스를 백업하는 방법을 설명합니다.
데이터베이스 백업
데이터베이스를 백업하기 전에 Tomcat 서비스를 중지합니다. Tomcat 서비스는 "Dell WMS: Tomcat Service"로 나타나며 Local
Services에서 중지해야 합니다.
MongoDB의 내용을 덤프하려면 다음 명령을 실행합니다.
mongodump --host <mongodb_host> -u stratus –p <db_password> --authenticationDatabase admin --db
stratus --out ".\wmsmongodump"
MarioDB의 내용을 덤프하려면 다음 명령을 실행합니다.
mysqldump --routine –h<mariadb_host> -ustratus –p<db_password> stratus > ".\wmsdump.sql"
데이터베이스 복원
데이터베이스를 복원하기 전에 Tomcat 서비스를 중지합니다. Tomcat 서비스는 "Dell WMS: Tomcat Service"로 나타나며 Local
Services에서 중지할 수 있습니다.
● MongoDB를 복원하려면 stratus 데이터베이스의 상위 디렉터리인 wmsmongodump 디렉토리에서 다음 명령을 실행해야 합니다.
○ echo "db.dropDatabase()" | mongo -u stratus -p <db_password> --authenticationDatabase admin
--host <db_host> stratus
○ mongorestore --host <db_host> -u stratus -p <db_password> --authenticationDatabase admin --
db stratus ".\stratus"
● wmsdump.sql 디렉토리에서 다음 명령을 실행하여 MariaDB를 복원해야 합니다.
○ Mysql.exe --verbose -h<mariadb_host> -ustratus -p<db_password> -e "DROP DATABASE stratus"
○ Mysql.exe --verbose -h<mariadb_host> -ustratus -p<db_password> -e "CREATE DATABASE stratus
DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci"
○ Mysql.exe --verbose -h<mariadb_host> -ustratus -p<db_password> stratus < ".\wmsdump.sql"
8
24 유지관리