Backing Up the Junos Space Network Management Platform Database
A user with the System Administrator or Super Administrator role can back up the Junos Space Platform database and later use the backup file to restore the Junos Space Platform database to a previous state. You can back up all system data, which includes all databases (MySQL, Cassandra, and network monitoring data), DMI schemas, and configuration files, and save the backup file on both the primary and secondary nodes. This fallback system allows you to restore the system even if one of the database nodes crashes. Typically, the database backup file contains configuration data for managed nodes, managed devices, deployed services, scheduled jobs, Junos Space Platform users, network monitoring, and so on.
You can perform local and remote backup and restore operations. A local backup operation copies the backup file to the default directory /var/cache/jboss/backup. A remote backup operation copies the backup file to remote network hosts.
When you perform a local backup operation:
On a fabric with one node, the backup file is saved on the primary node.
On a fabric with multiple nodes, only the primary and secondary nodes are considered database nodes and therefore contain database backup files. The backup operation is initiated only from the secondary node and the backup file is saved to the /var/cache/jboss/backup location on the secondary node.
If the backup operation is successful, then the backup file is synchronized with (copied to) the primary node and both primary and secondary nodes have the same backup file. However, if the backup operation fails on the secondary node (for reasons such as insufficient space), then the backup operation is performed on the primary node.
If dedicated database nodes are present in the fabric, the backup files are always stored in the dedicated database nodes.
In a fabric with dedicated database nodes, the MySQL database backup is initiated on the secondary database node and the backup file is saved to the /var/cache/jboss/backup directory on the secondary database node.
If the backup operation is successful, then the backup file is synchronized with (copied to) the primary database node and both the primary and secondary database nodes have the same backup file.
If Cassandra nodes are present in the fabric, the Cassandra database from one of the Cassandra nodes is backed up.
The network monitoring data backup is initiated on the Junos Space node when no FMPM node exists. When FMPM nodes are present in the fabric, the network monitoring data backup is initiated on the FMPM node and then copied to the database nodes and stored.
When you back up the Junos Space Platform database, an audit log entry is automatically generated. From the Audit Log inventory page, you can filter the data by using the Database Backup keyword to view details about the database backup operations that were performed.
To back up the Junos Space Platform database:
All the backup files are saved in a single compressed TAR file (extension .tgz) with the filename backup_timestamp.tgz, where timestamp indicates the date and time when the backup was performed. The backup file contains either MySQL, Cassandra, and network monitoring data, MySQL and network monitoring data, MySQL and Cassandra data, or just MySQL data depending on whether you have chosen to back up the Cassandra and network monitoring data or not.
For troubleshooting, see the following logs on the Junos Space server:
/var/log/nma.log
/var/log/nma/*.log
/tmp/maintenance.log