Versions Compared

Key

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


The information on this page refers to License Statistics v5.15 or newer, which upgraded MySQL to v5.7. If you are using an earlier version of License Statistics, please refer to the documentation for releases prior to v5.15.


Info
Important: Be sure to make a backup before uninstalling License Statistics. All files will be deleted from the License Statistics installation directory during the uninstallation.


Info

Important: All automated scripts (mysql_xxx.bat or mysql_xxx.sh) described in this document are configured to operate on an embedded database running on default configuration settings, as listed below. In all other cases (different configuration or external database), you must either do manual operations on the database or adjust the scripts to your custom needs.

Default settings for embedded database:

HostPortUserPasswordDatabase Name
localhost3306root
xformation_licstat


Determining how to do the backup

You can should use the automated backup and restore scripts provided with License Statistics or you may need to if possible. However, if your needs and installation do not allow you to use the automated scripts, you can perform the backup and restore procedures manually, depending on your needs and your installation.

Using License Statistics backup and restore scripts

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

Script for WindowsScript for LinuxDescription
mysql_start.batmysql_start.shStarts the MySQL database.
mysql_stop.batmysql_stop.shStops the MySQL database.
mysql_backup.batmysql_backup.shBacks up the License Statistics database.
mysql_restore.batmysql_restore.shRestores the License Statistics database.
mysql_start_backup_stop.batmysql_start_backup_stop.shStarts the MySQL database, backs up the database, and stops the MySQL database.
mysql_start_restore_stop.batmysql_start_restore_stop.shStarts the MySQL database, restores the database, and stops the the MySQL database.


Info
Note

...

: You may not be able to run the scripts as a normal user on Windows due to Windows limitations, so be sure to run the scripts as an administrator (see http://technet.microsoft.com/en-en/library/cc947813(v=ws.10).aspx for instructions on starting a command prompt as an administrator).

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 supplied scripts. You must also do manual backups if you are running EMBEDDED64 (or EMBEDDED32 for version lower than v4.19.1) with EMBEDDED64 with any custom settings, such as a custom database name, port, password set, or different user.

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

...

  1. Go to the License Statistics installation directory and select the MySQL directory 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). For License Statistics v4.19.1 and newer the directory name is mysql (EMBEDDED64).
  2. Ensure you have enough space for the database dump.

...

The following instructions assume that you are using the License Statistics scripts to backup the database. If you are backing up the database manually, use the scripts to guide you in what is needed for manual backup, and be sure the backup includes all stored procedures and views.

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. Open a command prompt with full administrator permissions (see http://technet.microsoft.com/en-en/library/cc947813(v=ws.10).aspx for instructions on starting a command prompt as an administrator).
  3. Navigate to the database folder named "mysql" under the License Statistics installation directory.
  4. Execute the "mysql_start.bat to " script to launch MySQL client.
  5. After MySQL starts, execute the "mysql_backup" script. bat. The This script creates a .dump file in the directory from which the script was executed.
  6. When the backup is complete, execute the "mysql_stop.bat script." script.
Tip

You can perform steps 4-6 at the same time rather than individually by using the "mysql_start_backup_stop" script.


Info
Backing up the database may take a long time, depending on the volume of data in your database.

The script creates the "xformation_licstat.dump" file.

When the backup is complete:

...

  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. Open a command prompt with full administrator permissions.
  3. Navigate to the database folder named "mysql" under the License Statistics Directoryinstallation directory.
  4. Put the saved database dump in the "mysql" directory.
  5. Start the MySQL database using the "mysql_start" script.
  6. If the database already exists, drop it before attempting the restore by running "mysql_clean.bat.
  7. Put the saved database dump in the mysql directory under the License Statistics installation directory.
  8. "
  9. Restore the database using the "mysql_restore" script.
  10. Run the "mysql_stop in order " script to shut down the MySQL database.
    As an alternative, you can use the  
Tip

You can perform steps 5, 7 and 8 at the same time rather than individually using the "mysql_start_restore_stop" script

...

; however, this script will work only if the database doesn't already exist.


...

Restoring the database may take a long time, depending on the volume of data in your database.

...

Tip
When upgrading License Statistics to a new version, you do not have to restore the database dump. You can use a new database (not necessarily the one that was used before upgrading) as well.


Info

Restoring the database may take a long time, depending on the volume of data in your database.


After the database is restored:

...

  1. Review the new default configuration file (xflicstat.cfg) and your existing configuration file, and copy the customized settings from the old configuration file to the new configuration file. For example, the configuration file contains information about the directory where License Statistics is installed, so if License Statistics was previously installed in a different directory, you must update this information in the new configuration file. In addition, new License Statistics releases may add or remove configuration settings from xflicstat.cfg, so It is important that you use the new xflicstat.cfg file rather than overwriting it with your previous version.


    Info
    Important: Do not change the structure of the new xflicstat.cfg file.

  2. Copy the license file (license.lic) and 3rd party utilities (for example, lmutil.exe) back into the License Statistics directory.

...

  1. the License Statistics directory.