Back Up and Restore Using the Network File System Server
You can back up the Virtual Appliance data to the Network File System (NFS) server. Follow these steps to back up the Virtual Appliance data:
Set Up the NFS Server
Follow these steps to install and configure the NFS server on AlmaLinux or Ubuntu:
Configure the NFS Parameters on Virtual Appliance
Edit the nfs section in the globals.yaml.gotmplfile with the NFS server details on the required Virtual Appliances:
Sample NFS parameters:
# NFS parameters
nfs:
server: 10.0.203.142
path: /mnt/nfs_share
Configure the NFS Server on the globals.yaml.gotmpl File
Back Up the Virtual Appliance Data in the NFS Server
Snapshots capture the state of the datastore and can be used to restore data. You can store multiple snapshots in a single repository. The following commands stores the snapshots in the virtual-appliance-repo-nfs repository.
Create a snapshot for each datastore:
- Elasticsearch
-
CODE
appdcli run es_backup create-snapshot <repo-name> <snapshot-name>ExampleCODEappdcli run es_backup create-snapshot virtual-appliance-repo-nfs es-snapshot - PostgreSQL
-
CODE
appdcli run pg_backup create-snapshot <repo-name>ExampleCODEappdcli run pg_backup create-snapshot repo3 - MySQL
-
CODE
appdcli run mysql_backup create-snapshot <repo-name>ExampleCODEappdcli run mysql_backup create-snapshot repo3
Restore Snapshots from the NFS server
Use the snapshots that you have stored in NFS to restore the datastores.
Delete the Snapshots from the NFS Server
If you no longer require the snapshot, you can delete the snapshot from NFS.
- Elasticsearch
-
CODE
appdcli run es_backup delete-snapshot <repo-name> <snapshot-name>ExampleCODEappdcli run es_backup delete-snapshot virtual-appliance-repo-nfs es_snapshot