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 theglobals.yaml.gotmplfile with the NFS server details:
# NFS parameters
nfs:
server: 10.0.203.142
path: /mnt/nfs_share
Configure the NFS Server on theglobals.yaml.gotmplFile
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
-
appdcli run es_backup create-snapshot <repo-name> <snapshot-name>
Exampleappdcli run es_backup create-snapshot virtual-appliance-repo-nfs es-snapshot
- PostgreSQL
-
appdcli run pg_backup create-snapshot <repo-name> <snapshot-name>
Exampleappdcli run pg_backup create-snapshot repo3 pg-snapshot
- MySQL
-
appdcli run mysql_backup create-snapshot <repo-name> <snapshot-name>
Exampleappdcli 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
-
appdcli run es_backup delete-snapshot <repo-name> <snapshot-name>
Exampleappdcli run es_backup delete-snapshot virtual-appliance-repo-nfs es_snapshot
- PostgreSQL
-
appdcli run pg_backup delete-snapshot <repo-name>
Exampleappdcli run pg_backup delete-snapshot repo3 pg_snapshot
- MySQL
-
appdcli run mysql_backup delete-snapshot <repo-name>
Exampleappdcli run mysql_backup delete-snapshot repo3 mysql_snapshot