Users Guide

Database Backup/Restoration | Database Management
154 OMNM 6.5.3 Installation Guide
MySQL Backup/Restore
Follow these instructions to back up and restore the embedded MySQL database using native
MySQL utilities on a command line.
Backup
Open a command shell (
Start > Run
cmd
, in Windows), and then type the following at the
prompt. By default, the primary database is
owbusdb,
and
owmetadb
includes meta-
information. For the web server, back up
lportal
and
synergy
too (the latter contains
multitenancy information). The example includes defaults for name and password. These are
typically different from the login / password for the application.
mysqldump -a -u root --password=[password] owbusdb > FILENAME.mysql
For example:
mysqldump -a -u root --password=dorado owmetadb > owmetadb.mysql
If you have Performance monitors or Traffic Analyzer, you must also back up your stored procedures
otherwise they do not get restored when you restore the database. The command line here adds
--
routines
. For example:
mysqldump -a -u oware --password=dorado --routines owbusdb >
owbusdb.mysql
This writes the owbusdb to a plain-text file called
FILENAME.mysql
(
owbusdb.mysql
in our
examples). This file is a full backup with which you can fully restore your database in case of
problems.
Here are the backup commands for all the databases:
mysqldump -a -u root --password=dorado owbusdb > owbusdb.mysql
mysqldump -a -u root --password=dorado owmetadb > owmetadb.mysql
mysqldump -a -u root --password=dorado lportal > lportal.mysql
mysqldump -a -u root --password=dorado synergy > synergy.mysql
Restoring
Restoring from
FILENAME.mysql
is a three step process. This occurs, again, in a command shell:
1
Drop the database:
mysqladmin -u USERNAME -p drop owbusdb
or
mysqadmin -u USERNAME --password=[password] drop owbusdb
2
Recreate the database
mysqladmin -u USERNAME -p create owbusdb
or
mysqadmin -u USERNAME --password=[password] create owbusdb
3
Import the backup data
mysql -u USERNAME -p owbusdb < FILENAME.mysql
or
mysql -u USERNAME --password=[password] owbusdb < FILENAME.mysql
Here are restoration commands for all the databases: