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
This section considers AlmaLinux OS as an example OS to install the NFS server. Follow these steps to install and configure the NFS server:
Configure the NFS Parameters on Virtual Appliance
Edit the globals.yaml.gotmpl Edit the globals.yaml.gotmpl file with the NFS server details:
# 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> <snapshot-name>ExampleCODEappdcli run pg_backup create-snapshot repo3 - MySQL
-
CODE
appdcli run mysql_backup create-snapshot <repo-name> <snapshot-name>ExampleCODEappdcli run mysql_backup create-snapshot repo3 mysql-snapshot
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 - PostgreSQL
-
CODE
appdcli run pg_backup delete-snapshot <repo-name>ExampleCODEappdcli run pg_backup delete-snapshot repo3 pg_snapshot - MySQL
-
CODE
appdcli run mysql_backup delete-snapshot <repo-name>ExampleCODEappdcli run mysql_backup delete-snapshot repo3 mysql_snapshot