Configure the Backupninja restore pipeline

Configure the Backupninja restore pipelineΒΆ

The Backupninja restore pipeline supports restore of the following components:

  • MAAS, including the PostgreSQL database that contains the data for MAAS and machines that are registered and managed by MAAS
  • Salt Master, including the PKI keys, certificates, the Salt Minion on cfg01, and the metadata model

To configure the Backupninja restore pipeline:

  1. Log in to the Salt Master node.

  2. Verify that the class with the Backupninja restore Jenkins job is present in the pillar:

    salt -C 'I@jenkins:client and not I@salt:master' pillar.get jenkins:client:job:backupninja_restore
    
  3. If the pillars do not include the Backupninja restore pipeline:

    1. Add the following class to cicd/control/leader.yml:

      - system.jenkins.client.job.deploy.backupninja_restore
      
    2. Rerun the jenkins state on the cid01 node:

      salt -C 'I@jenkins:client and not I@salt:master' state.sls jenkins.client
      
  4. If you plan to restore the Salt Master node and MAAS:

    1. In cluster/infra/config/init.yml, configure the pillar for salt-master and salt-minion:

      parameters:
         salt:
         master:
            initial_data:
               engine: backupninja
               source: ${_param:backupninja_backup_host}  # the backupninja server that stores Salt Master backups, for example: kvm03
               host: ${_param:infra_config_hostname}.${_param:cluster_domain}  # for example: cfg01.deploy-name.local
               home_dir: '/path/to/backups/' # for example: '/srv/volumes/backup/backupninja'
         minion:
            initial_data:
               engine: backupninja
               source: ${_param:backupninja_backup_host}  # the backupninja server that stores Salt Master backups
               host: ${_param:infra_config_hostname}.${_param:cluster_domain}  # for example: cfg01.deploy-name.local
               home_dir: '/path/to/backups/' # for example: '/srv/volumes/backup/backupninja'
      

      Note

      If salt-master restore has been already performed on your cluster, first delete the master-restored and minion-restored files in /srv/salt.

    2. In cluster/infa/maas.yml, add the following class for MAAS restore:

      - system.maas.region.restoredb
      
  5. Since 2019.2.12 If you plan to restore the Keystone credential keys and such restore operation has been already performed on your cluster, first delete the .keystone_restored file in /etc/salt.