Versions Compared

Key

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


The information on this page refers to License Statistics v6.18 or newer, which introduced the CLI. If you are using an earlier version of License Statistics, please refer to the documentation for previous releases.


Info

Default settings for an embedded database:

HostPortUserPasswordDatabase Name
localhost3306root
xformation_licstat

...


Determining how to do the backup

You can use automated backup and restore scripts provided with License Statistics or you may need to 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 these scripts so you are familiar with what they do, and decide if they will work for your backup and restoration needs.

...

Note that 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 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 the backup

Before you begin your database backup:

...

perform a backup using the License Statistics Manager for Windows, or the License Statistics CLI (Command Line Interface) for either Windows or Linux.

Using the License Statistics Manager for the backup 

For Windows installations, you can create the backup using the Backup button in the Maintenance section of the License Statistics Manager. 

Image Added

Using the CLI for the backup

The CLI can be used for backup, restore and related operations. The CLI is available for both Linux and Windows:

For Linux: xflicstat-cli

For Windows: xflicstat-cli.exe

The CLI provides the following commands for performing backups. 

ActionCLI command
Back up the License Statistics database (starts, backs up, and stops the MySQL database)storage backup
Restore the License Statistics database (starts, restores, and stops the MySQL database)storage restore
Drop (remove) the License Statistics databasestorage clean
Reset the Admin password to the default password

Anchor
reset_pwd
reset_pwd
resetAdminPassword


Info
Note: The CLI should always be used with Administrator or root privileges.

Anchor
backup
backup

...

Backing up the database

The following instructions assume that you are using the License Statistics scripts CLI 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.
    • For Windows:

      Code Block
      languagebash
      cd C:\Program Files\X-Formation\License Statistics
  4. Execute mysql_start.bat to launch MySQL client.

    • For Linux:

      Code Block
      languagebash
      cd /opt/xflicstat/bin
  5. Execute the "xflicstat-cli.exe storage backup" command. This command After MySQL starts, execute mysql_backup.bat. The script creates a .dump file .When the backup is complete, execute mysql_stop.bat script.in the directory from which the command was executed.


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

...

When the backup is complete:

...

.

...


Anchor
Restoring database
Restoring database
Restoring the database

The following instructions assume that you are using the License Statistics scripts CLI to restore the database. If you are restoring the database manually, use the scripts to guide you in what is needed for manual restoration.

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. Open a command prompt with full administrator permissions.
  3. Navigate to the database folder named mysql under the License Statistics Directory.
    Start the MySQL database using the mysql_start script.installation directory.
    • For Windows:

      Code Block
      languagebash
      cd C:\Program Files\X-Formation\License Statistics


    • For Linux:

      Code Block
      languagebash
      cd /opt/xflicstat/bin
  4. If the database already exists, drop clean it before attempting the restore by running mysql_clean.bat.
  5. Put the saved database dump in the mysql directory under the License Statistics installation directory.
  6. using the "xflicstat-cli.exe storage clean" command.
  7. Restore the database using the mysql_restore script.
  8. Run mysql_stop in order to shut down the MySQL database.
  9. As an alternative, you can use the mysql_start_restore_stop script to start, restore and stop the database all in one step.

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

...

  1. "xflicstat-cli.exe storage restore dump_file" command.


Tip
When upgrading License Statistics to a new version, you do not have to restore the database dump.

...

After the database is restored:

...

 


Info

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

...

.