You can make backups of License Statistics host and/or database as described below.
Backing up the License Statistics host
If you are running License Statistics in a virtual environment, we recommend backing up the entire virtual machine (and database VM if it is external). To perform the backup, follow the instructions for the virtual environment of your choice and the policy used in your organization.
Backing up the License Statistics database
To make a backup of the License Statistics database, use one of the methods described below.
Use the xflicstat-cli utility (recommended)
You can use the xflicstat-cli utility to perform a database backup, as described in the following sections.
Using the License Statistics CLI
Backing up and restoring an embedded database
For scheduled backups, consider using the optional "--allow-live-backup" flag to allow backups to be performed without stopping License Statistics.
Use the mysqldump utility
Be aware of using the Windows PowerShell console for creating manual database dumps. In general, Windows PowerShell uses the Unicode UTF-16LE encoding by default.
However, UTF-16 is not permitted as a connection character set (see Impermissible Client Character Sets), so the dump file cannot be loaded correctly.
It's recommended to use regular CMD in a Windows environment if you are not familiar with the Windows PowerShell console.
For more information, please take a look at https://dev.mysql.com/doc/refman/8.4/en/mysqldump.html.
To back up the License Statistics database using the mysqldump utility:
- Run the mysqldump utility (paths shown are default paths; revise the path if needed for your installation):
- For Windows: C:\Program Files\X-Formation\License Statistics\mysql\mysqldump.exe
- For Linux: /opt/xflicstat/embedded/bin/mysqldump - Enter the following command:
mysqldump --single-transaction -h<host> -P<port> -u<user> -p<password> <database> > licstat.sql
For example, the command for backing up an embedded database is:
mysqldump --single-transaction -uroot xformation_licstat > licstat.sql