Configuring database backups
Description
It is strongly recommended that you configure a database backup storage location that is not local to the NSP cluster. To do so, you must configure NFS using the following parameters in the backups section of the nsp-config.yml file:
Note: If the NFS parameters are configured, the capacity parameter must be unconfigured, as shown below.
storage:
existingClaim: ""
capacity: ""
nfs:
server: "server"
path: "path"
where
server is the NFS server IP address
path is the local path of the exported file system
Configuring NFS backup storage on an existing deployment
If you are configuring NFS backup storage on an existing NSP deployment, you must first uninstall the NSP with deleteOnUndeploy set to true in the platform section, kubernetes subsection of the nsp-config.yml file.
Setting deleteOnUndeploy to true ensures that the existing PVCs, including nsp-backup-storage, and the associated PVs are deleted. After you configure the NFS parameters, apply the configuration using the following command:
./nspdeployerctl install --config --deploy
Note: If the NSP cluster VMs do not have the required SSH key, you must include the --ask-pass argument in the command, as shown in the following example, and are subsequently prompted for the root password of each cluster member:
nspdeployerctl --ask-pass install --config --deploy
File service backup
File service backup excludes the accounting/output/ready directory. Accounting files in this directory are not included in scheduled or manual file service backups.
Reducing backup duration
If the database is large and you have enough storage for intermediate database files, you can performing one of the following to reduce the PostgreSQL backup duration.
-
During installation, add the following in the override values.yaml file in the pg section, backup subsection:
usebasebackup: true
NSP uses the provided storage to store the intermediate files and saves the backup file on the original location.
-
After the installation, set the following in the nspos-postgresql-configmap file:
USEBASEBACKUP:true
In the next scheduled backup, the system uses the optimized backup method.
See “How do I configure scheduled NSP backups?” in the NSP System Administrator Guide for the detailed steps.