Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

License Statistics includes the following scripts for automating backups when EMBEDDED32/EMBEDDED64 (the databases when the database created by License Statistics (EMBEDDED32 or EMBEDDED64) is used with default settings. Review these scripts so you are familiar with what they do, and decide if they will work for your backup and restoration needs.

ScriptDescription
mysql_backupBacks up the License Statistics database.
mysql_restoreRestores the License Statistics database.
mysql_start_backup_stopStarts the MySQL databases, backs up the database, and stops the database.
mysql_start_restore_stopStarts the MySQL databases, restores the database, and stops the database.

Note that you may not be able to run the scripts as a normal user on Windows due to Windows limitations, so run the scripts as an Administrator (http://technet.microsoft.com/en-en/library/cc947813(v=ws.10).aspx).

Backing up and restoring the database manually

When running License Statistics using an external database that is not maintained by License Statistics, you must do manual backups instead of using the scripts. Review the scripts to ensure your manual steps do what the script does.supplied scripts. You must also do manual backups if you are running EMBEDDED32/EMBEDDED64 with any custom settings, such as custom database name, port, password set, or different user.

 If you must do a manual backup, review the scripts to do the backup according to what is done in the scripts.

Preparing for a backup

Before you begin your database backup:

  1. Depending on embedded database you use, go Go to the License Statistics installation directory and select the MySQL directory . The MySQL for your License Statistics database. This directory is named mysql_version, where version is either x86 or x64 (mysql_x86 = EMBEDDED32, and mysql_x64 = EMBEDDED64). 
  2. Ensure you have enough space for the database dump.

...

To perform a backup of the License Statistics database:

  1. Stop License Statistics. Backing up the database when License Statistics is running will cause the database dump to be inconsistent with the current state of monitored data.
  2. Start the MySQL database using the mysql_start script.
  3. Create a database backup using the mysql_backup script.
  4. As an alternative, you can use the mysql_start_backup_stop script to start the database, backup the database, and stop the database all at one time.

...

To restore the data:

  1. Stop License Statistics. Restoring the database when License Statistics is running will cause the state of the database to be inconsistent with monitored data.
  2. Start the MySQL database using the mysql_start script.
  3. If the database already exists, drop it before attempting the restore by running mysql_clean.bat, and finally mysql_stop.bat.
  4. Put the saved database dump in the mysql directory under the License Statistics installation directory.
  5. Restore the database using the mysql_restore script. 
  6. As an alternative, you can use the mysql_start_restore_stop script to start, restore and stop the database all at one time.

...