Create an instant backup using Backupninja pipeline

Create an instant backup using Backupninja pipeline

This section describes how to create an instant backup of the MAAS PostgreSQL database, the Salt Master node, and the Dogtag server files and database using the Backupninja Jenkins pipeline job.

Note

Backup of the Dogtag server and database using the pipeline is available starting from the 2019.2.6 maintenance update only. For previous versions, use the pipeline job only to back up the Salt Master node and MAAS PostgreSQL database. To back up Dogtag on the MCP version prior to 2019.2.6, see: Back up the Dogtag server files and database prior to 2019.2.6.

Warning

The pipeline job executes all configured Backupninja jobs present on the related MAAS, Salt Master, and Dogtag hosts.

To create an instant backup using the Jenkins pipeline job:

  1. Verify that you have completed the steps described in Enable a backup schedule for the Salt Master node using Backupninja and Enable a backup schedule for a MAAS PostgreSQL database using Backupninja to backup Salt master node and MaaS.

  2. Verify that you have completed the steps described in Prepare for the Dogtag backup and restore.

  3. Configure the backup pipeline job as described in Configure the Backupninja backup pipeline.

  4. Log in to the Jenkins web UI.

  5. Select from the following options:

    • For MCP versions prior to 2019.2.6, open the Backupninja salt-master/MaaS backup pipeline job.
    • For MCP versions starting from 2019.2.6, open the Backupninja backup pipeline pipeline job.
  6. Specify the required parameters:

    Backupninja backup pipeline parameters
    Parameter Description and values
    SALT_MASTER_URL Define the IP address of your Salt Master node host and the salt-api port. For example, http://172.18.170.27:6969.
    SALT_MASTER_CREDENTIALS Define credentials_id as credentials for the connection.
    ASK_CONFIRMATION Select if you want the pipeline job to wait for a manual confirmation before running specific steps.
    BACKUP_SALTMASTER_AND_MAAS Added since 2019.2.6 Select to back up Salt Master and MAAS.
    BACKUP_DOGTAG Added since 2019.2.6 Select to back up the Dogtag files and database.
    BACKUP_KEYSTONE_CREDENTIAL_KEYS Added since 2019.2.12 Select to back up the Keystone credential keys.
  7. Click Build.

    Warning

    During the first backup using the Jenkins pipeline job, a manual confirmation may be required to install the required packages. After the first successful run, no manual confirmation is required.

    To disable the manual confirmation, set the ASK_CONFIRMATION parameter to False.

    The pipeline job workflow:

    1. Pillar verification. Verify that initial_data in pillars are defined correctly to prevent any issues related to a wrong configuration during the execution of the pipeline job.
    2. Backup location check. Verify that the backup node is ready and all required packages are installed.
    3. Backup preparation. Verify that the backupninja states are up to date.
    4. Backup execution.
  8. Verify that the backup has been created and, in case of a remote backup storage, moved correctly.