Data protection and disaster recovery
Learn about protection and recovery options for Trident and volumes created using Trident. You should have a data protection and recovery strategy for each application with a persistence requirement.
Trident replication and recovery
You can create a backup to restore Trident in the event of a disaster.
Trident replication
Trident uses Kubernetes CRDs to store and manage its own state and the Kubernetes cluster etcd to store its metadata.
-
Back up the Kubernetes cluster etcd using Kubernetes: Backing up an etcd cluster.
-
Place the backup artifacts on a FlexVol.
We recommend you protect the SVM where the FlexVol resides with a SnapMirror relationship to another SVM.
Trident recovery
Using Kubernetes CRDs and the Kubernetes cluster etcd snapshot, you can recover Trident.
-
From the destination SVM, mount the volume which contains the Kubernetes etcd data files and certificates on to the host which will be set up as a master node.
-
Copy all required certificates pertaining to the Kubernetes cluster under
/etc/kubernetes/pki
and the etcd member files under/var/lib/etcd
. -
Restore the Kubernetes cluster from the etcd backup using Kubernetes: Restoring an etcd cluster.
-
Run
kubectl get crd
to verify all Trident custom resources have come up and retrieve the Trident objects to verify all data is available.
SVM replication and recovery
Trident cannot configure replication relationships, however, the storage administrator can use ONTAP SnapMirror to replicate an SVM.
In the event of a disaster, you can activate the SnapMirror destination SVM to start serving data. You can switch back to the primary when systems are restored.
Consider the following when using the SnapMirror SVM Replication feature:
-
You should create a distinct backend for each SVM with SVM-DR enabled.
-
Configure the storage classes to select the replicated backends only when needed to avoid having volumes which do not need replication provisioned onto the backends that support SVM-DR.
-
Application administrators should understand the additional cost and complexity associated with replication and carefully consider their recovery plan prior to beginning this process.
SVM replication
You can use ONTAP: SnapMirror SVM replication to create the SVM replication relationship.
SnapMirror allows you to set options to control what to replicate. You'll need to know which options you selected when preforming SVM recovery using Trident.
-
-identity-preserve true replicates the entire SVM configuration.
-
-discard-configs network excludes LIFs and related network settings.
-
-identity-preserve false replicates only the volumes and security configuration.
SVM recovery using Trident
Trident does not automatically detect SVM failures. In the event of a disaster, the administrator can manually initiate Trident failover to the new SVM.
-
Cancel scheduled and ongoing SnapMirror transfers, break the replication relationship, stop the source SVM and then activate the SnapMirror destination SVM.
-
If you specified
-identity-preserve false
or-discard-config network
when configuring your SVM replication, update themanagementLIF
anddataLIF
in the Trident backend definition file. -
Confirm
storagePrefix
is present in the Trident backend definition file. This parameter cannot be changed. OmittingstoragePrefix
will cause the backend update to fail. -
Update all the required backends to reflect the new destination SVM name using:
./tridentctl update backend <backend-name> -f <backend-json-file> -n <namespace>
-
If you specified
-identity-preserve false
ordiscard-config network
, you must bounce all application pods.If you specified -identity-preserve true
, all volumes provisioned by Trident start serving data when the destination SVM is activated.
Volume replication and recovery
Trident cannot configure SnapMirror replication relationships, however, the storage administrator can use ONTAP SnapMirror replication and recovery to replicate volumes created by Trident.
You can then import the recovered volumes into Trident using tridentctl volume import.
Import is not supported on ontap-nas-economy , ontap-san-economy , or ontap-flexgroup-economy drivers.
|
Snapshot data protection
You can protect and restore data using:
-
An external snapshot controller and CRDs to create Kubernetes volume snapshots of Persistent Volumes (PVs).
-
ONTAP Snapshots to restore the entire contents of a volume or to recover individual files or LUNs.