How do I configure scheduled NSP backups?

Purpose

Perform this procedure to configure scheduled backups of the following NSP cluster databases:

  • Kubernetes etcd data

  • NSP file service data

  • Neo4j

  • PostgreSQL

  • nspos-solr

  • nsp-tomcat

  • nrcx-tomcat

  • OpenSearch

Note: In the above list, backup of the OpenSearch database refers to backup and restore of configured data where the data is configured by the user or already available in the OpenSearch cluster. It is not related to log data in How do I restore the NSP OpenSearch log data?.

Scheduled backups are enabled by default, and scheduled to run daily at 12:30 AM UTC.

Note: By default, the NSP retains the three most recent scheduled backups.

Note: release-ID in a file path has the following format:

R.r.p-rel.version

where

R.r.p is the NSP release, in the form MAJOR.minor.patch

version is a numeric value

Steps
 

Log in as the root or NSP admin user on the NSP deployer VM.


Open the following file with a plain-text editor such as vi:

/opt/nsp/NSP-CN-DEP-release-ID/NSP-CN-release-ID/config/nsp-config.yml


Locate the section that begins with the following:

  backups:


Configure the following parameters:

Note: If the schedule value is an empty string, no scheduled backup is performed.

Note: See the RHEL cron man page for information about defining a crontab schedule.

      schedule: "definition"

      retained: n

where

definition is a UNIX crontab schedule definition; for example, “30 0 * * *” specifies the default backup schedule of 12:30 a.m. daily

n is the number of backups to retain


Save and close the file.


If the database is large and you have the required storage to store the PostgreSQLdatabase in intermediate files, perform the following to reduce the PostgreSQL backup duration.

  1. Log in as the root user on the NSP cluster host that is a Kubernetes control-plane node in the Kubernetes cluster.

  2. Open a console window.

  3. Enter the following to configure the USEBASEBACKUP parameter in nspos-postgresql-configmap:

    kubectl edit configmap nspos-postgresql-configmap -n nsp-psa-restricted

    The file opens in a plain-text editor such as vi.

  4. Locate the section that begins with the following:

      pg_backup.conf:

  5. Configure the following:

    USEBASEBACKUP:true

  6. Save and close the file.

    In the next scheduled backup, the system uses the optimized backup method.

End of steps