Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Watch4Net | EMC M&R | ViPR SRM | VNX M&R - How to manually backup and restore the database (303855)

Last Updated: 5/29/2020Categories: How toTotal Views: 3903Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Resolution

This article explains the procedure to manually backup the database used by ViPR SRM, Watch4net/EMC M&R or VNX M&R. There is no automated procedure to backup and restore the database.

To backup, following options are available:

Database Backup:

Virtual Machine snapshot: If the application is installed on a VM, take a snapshot of the VM.

Third-party backup tool: Use a third-party tool and take a backup the database directory - /opt/APG/

Manual backup copy: Manually copy the the folders to a secure backup location as described in the following section.

Manual backup copy procedure
The following steps present the commands to manually lock, backup and restore a ViPR SRM, Watch4net or VNX M&R database:

1. Before you copy the database folders, you must lock the database folders. Use the following commands to lock the Primary and Secondary backends:

\bin\lock-mysql-database.cmd - Primary Backend

\bin\lock-mysql-database-apg1.sh - Secondary Backend

Note the following about the locking the database:

Executing the DB lock using any of the default  lock-mysql-database-apgX.sh  scripts provided will apply a global lock to the MySQL databases which is why only 1 script needs to be run in this instance.

Data will be stored in application backend while the database is locked. This data will be copied to the database once it is unlocked.

In ViPR SRM 4-vApp deployments, you must run lock-apg-database-apg1.sh, lock-apg-database-apg2.sh, lock-apg-database-apg3.sh and lock-apg-database-apg4.sh ( or the global lock-- see above) on the Secondary Backend

Note:  If you are unable to lock the database using above command see DELL EMC KB article 450443 (https://support.emc.com/kb/450443)

Note:  In larger environments where a large number of reports may be running (particularly during the backup period), the table locking shown above may not be sufficient.  That is, performance may be impacted and hence require the databases to be shutdown first before taking backups.

In environments where this has been suspected to be the case, the key symptom seemed to be the corresponding backend backlog counts increasing dramatically after a backup is initiated (and frontend performance may be impacted also as a result).

Note also that the above hypothetical scenario is due to the nature and limitations of how mysql implements the "FLUSH TABLES WITH READ LOCK" functionality and not a fault with product itself.

2. Once the database is locked, copy the following folders to a secure location:

\Databases\MySQL\Default\data\apg  - Primary Backend
\Databases\MySQL\Default\data\master - Primary Backend

\Databases\MySQL\Default\data\apg1  - Secondary Backend
\Databases\MySQL\Default\data\apg2  - Secondary Backend
\Databases\MySQL\Default\data\apg3  - Secondary Backend
\Databases\MySQL\Default\data\apg4  - Secondary Backend

Manual backup using MySQL dump
Another manual backup option is to use the mysqldump command. The mysqldump procedure works well with smaller databases (less than 10 to 15GB). The dump-file generated by mysqldump might be bigger than your actual data, depending on how many indexes you present.

To backup a ViPR SRM, VNX M&R or Watch4net/EMC M&R database using MySQL dump, run the following commands:

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net apg > c:\apg.sql -> Primary Backend

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net master > c:\master.sql -> Primary Backend

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net apg1 > c:\apg1.sql -> Secondary Backend

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net apg2 > c:\apg2.sql -> Secondary Backend

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net apg3 > c:\apg3.sql -> Secondary Backend

\Databases\MySQL\Default\bin>mysqldump --user root --password=watch4net apg4 > c:\apg4.sql -> Secondary Backend

Note: The actual data will be stored in apg(primary backend), master(primary backend) and apg1, apg2, apg3(secondary backend). These two databases are required to restore the application.

Database Restore:
Restoring the database can be done as follows, depending on how the backup copy was created:

Restore the VM backup using snapshot manager

Restore using 3rd party backup/restore tool

Paste the manually copied files from the backup location to the new instance

Restore the backup that was done using the mysqldump command

The following sections explain the requirements for pasting manually copied and to restore databases backed up using the mysqldump command.

Pasting manually copied database files
Paste the following to the new VNX/W4N/SRM instance:

\Databases\MySQL\Default\data\apg

master(primary backend)

apg1,apg2, apg3, apg4(secondary backend)

Note: If the Solution Pack details is not visible even after copying the master database, then all Objects have to be discovered manually by   installing the Solution Pack with the same name once the database is copied to new instance. This will display historical data and the new data.

Restore databases backed up using the mysqldump command
The database backed up using the mysql dump procedure can be restored using the following MySQL command:

Note: MySql dump command works fine for apg database less than 10GB to 15GB.

\Databases\MySQL\Default\bin> mysql --user root --password=watch4net apg < apg.sql - Primary Backend
\Databases\MySQL\Default\bin> mysql --user root --password=watch4net master < master.sql - Primary Backend

\Databases\MySQL\Default\bin> mysql --user root --password=watch4net apg1 < apg1.sql - Secondary Backend
\Databases\MySQL\Default\bin> mysql --user root --password=watch4net apg2 < apg2.sql - Secondary Backend
\Databases\MySQL\Default\bin> mysql --user root --password=watch4net apg3 < apg3.sql - Secondary Backend
\Databases\MySQL\Default\bin> mysql --user root --password=watch4net apg4 < apg4.sql - Secondary Backend

If the above command fails, run the command as follows :

./mysql  --defaults-file=/opt/APG/Databases/MySQL/Default/my.cnf -u root -p apg < /opt/APG/apg.sql
password:watch4net

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

No results for undefined

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

Related Versions:

VMware Smart Assurance - Watch4Net/M&R

Take Our Survey

Support Assistant