Backup Your Metric Insights Instance
The mi-app-backup script is used to create a backups of your Metric Insights application and database. This backup tool will create a snapshot of your application database and critical files on the application server. The result of a backup is a tarball that can be used to restore the state of your application on the same or any other machine.
NOTES:
- You will need root privileges to do the following commands. So either sign in as root, or do each command prefixed with "sudo".
- Backup process creates a temporary folder:
- v7.0.1+:
/opt/mi/backup/.tmp/
- v6.4.5:
/tmp
- v7.0.1+:
- See Restore Your Metric Insights Instance for information about this complimentary process.
- Beginning v7.0.1, the backup process can be executed manually via MI Console.
1. Create the Backup File
To create an application backup file, run the mi-app-backup utility from the application server, inside of the Web container. An example command to create a backup using this utility is:
mi-app-backup -vv
This will create a backup tarball saved to /opt/mi/backup/
which is accessible from the host.
The file name will be something like mi-full-backup-hostname-vX.X.X-202412280215.tar.gz
.
- The backup file name includes the hostname, the version of Metric Insights, and the datetime for when the backup was created.
NOTES:
- You need to run the backup command inside the Web container ( run
mi-web
on the host to enter the Web container) - By default, the backup tarball is saved to
/opt/mi/backup
unless otherwise specified. This directory is accessible on the host (/opt/mi/backup
is mounted as a volume inside the Web container).
2. Usage
To see all backup creation options, run mi-app-backup -h
3. Examples
Examples of running mi-app-backup
script: