Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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.

Note:

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:

  1. On the Junos Space Platform user interface, select Administration > Database Backup and Restore.

    The Database Backup and Restore page appears.

  2. Click the Database Backup icon.

    The Database Backup page appears. The default behavior is a backup operation that occurs once a week (see 7 for more information).

  3. You can back up the database file locally on a fabric node or to a remote location (by using the Secure Copy Protocol [SCP]):
    • To back up the file locally, retain the selection of local in the Mode field (in the Mode Options section). In the local mode, the Junos Space Platform database backup is stored to the default directory /var/cache/jboss/backup.

      Note:

      When the local mode option is selected, the Username, Password, Confirm password, Machine IP, and Directory fields on the Database Backup page are disabled.

    • To back up the file remotely, do the following:

      1. In the Mode field (in the Mode Options section), select remote.

      2. In the Username field, enter a username to access the remote host server.

      3. In the Password field, enter the corresponding password.

      4. In the Confirm password field, reenter the password.

      5. In the Machine IP field, enter the remote host server IP address.

        Note:
        • Depending on whether the Junos Space fabric is configured with only IPv4 addresses or both IPv4 and IPv6 addresses, Junos Space Platform allows you to enter an IPv4 address or either an IPv4 or IPv6 address respectively for the SCP server.

        • The IPv4 and IPv6 addresses that you use must be valid addresses. Refer to http://www.iana.org/assignments/ipv4-address-space for the list of restricted IPv4 addresses and http://www.iana.org/assignments/ipv6-address-space for the list of restricted IPv6 addresses.

      6. In the Directory field, enter a directory path on the remote host server where you want to store the database backup file.

        Note:

        The directory path must already exist on the remote host server.

  4. In the Content Options section, do one of the following:
    • Retain the selection of the Network Monitoring check box for Junos Space Platform to back up network monitoring data, in addition to the Cassandra database (if the option is selected) and the default MySQL data.

      If you choose to back up network monitoring data, then the following information is backed up:

      • PostgreSQL network monitoring database

      • Configuration files in the /opt/opennms/etc directory and its subdirectories

      • Graph data in the /var/opennms/rrd directory and its subdirectories

    • Clear the Network Monitoring check box if you do not want to back up network monitoring data.

    • Retain selection of the Cassandra check box for Junos Space Platform to back up files in the Cassandra database, in addition to the network monitoring data (if the option is selected) and the default MySQL data.

    • Clear the Cassandra check box if you do not want to back up the Cassandra database.

      The Cassandra check box is available only if the Cassandra service is running on at least one node in the fabric. The check box is selected by default; you can clear the selection if you do not want to back up the Cassandra database files.

    • Select the DMI Schemas check box if you want to include the DMI schemas in the backup. This check box is available only from Release 17.2R1 onward.

    Note:

    By default, MySQL data is always backed up; the MySQL check box is selected and disabled.

  5. (Optional) In the Comment field, add a comment to describe or otherwise identify the backup operation.
  6. (Optional) Specify whether the Junos Space Platform database backup operation should occur immediately or be scheduled for later:
    • Select the Schedule at a later time check box to specify a later start date and time for the database backup operation.

    • Clear the Schedule at a later time check box (the default) to initiate the database backup operation as soon as you click Backup.

    Note:

    The selected time in the scheduler corresponds to the Junos Space server time but uses the local time zone of the client computer.

  7. (Optional) Specify whether the database backup should recur or not:
    • To schedule a recurring backup:

      Note:

      The Repeat check box is selected by default and the default behavior is a backup operation that occurs once a week.

      1. Specify the database backup recurrence by setting the interval and the increment, as indicated in Table 1. The default recurrence interval is 1 hour.

        Table 1: Backup Schedule Units and Increments

        Interval

        Increment

        Minutes

        Specify the number of minutes after which the backup should recur.

        Hourly

        Specify the number of hours after which the backup should recur.

        Daily

        Specify the number of days after which the backup should recur.

        Weekly

        Specify the number of weeks after which the backup should recur.

        In addition, specify the additional days of the week on which the backup should recur by selecting the appropriate check box. The day on which you specified the recurrence is already selected and disabled.

        Monthly

        Specify the day when you want the backup to recur. You can select from the following options:

        • last day of the month, or

        • On— Specify any particular day of a month.

        Yearly

        Specify the number of years after which the backup should recur.

        In addition, specify whether the backup should recur on the same date of the year (the default) or the same day of the specific week of the month every year. For example, if you configure the yearly recurrence on July 8 2015, which is the second Wednesday in July, you can specify whether the backup should recur on 8th July or on the second Wednesday of July.

      2. Specify when the recurrence should end in the Ends on field.

        • To specify that the recurrence does not end (the default), select Never.

        • To specify a date and time by which the recurrence ends, select the option button and specify a date and time

    • To specify that the database backup does not recur, clear the Repeat check box.

  8. Click Backup.

    A confirmation dialog box appears, which displays:Warning: Taking database backup may have an impact on system performance. Do you want to continue?

  9. Click OK on the confirmation dialog box to back up the Junos Space database.

    The Backup Job Information dialog box appears. Perform one of the following actions:

    • Click the Job ID on this dialog box to view the database backup job details on the Job Management page.

    • If you do not wish to view the job details (that is, whether the database backup job is a success or a failure), click OK on this dialog box. You are returned to the Database Backup and Restore page. If the backup job is successful, the new backup file is displayed on this page.

    • Click Cancel on this dialog box to cancel the database backup operation.

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