Learn about using with Trilio for Kubernetes with the Management Console
To get started with Trilio via the management console in your environment, the following steps must be performed:
Prerequisites
Authenticate access to the Management Console (UI). Refer to.
Configure access to the Management Console (UI). Refer toConfiguring the UI.
Steps Overview
Install a compatible CSI Driver
Create a Backup Target - A location where backups will be stored.
Create a retention policy (Optional) - To specify how long to keep the backups for.
Run Example:
Label Example
Helm Example
Operator Example
Virtual Machine Example
Namespace Example
Step 1: Install a CSI Driver
Skip this step if your environment already has a CSI driver installed with snapshot capability.
Trilio for Kubernetes requires a compatible Container Storage Interface (CSI) driver that provides the Snapshot feature.
You should check the Kubernetes CSI Developer Documentation to select a driver appropriate for your backend storage solution. See the selected CSI driver's documentation for details on the installation of the driver in your cluster.
Step 2: Create a Target
Create a secret containing the credentials for data stores to store backups. An example is provided below:
You can either create the secret using the above YAML definition or use the management console to create it as part of the workflow for creating the backup target.
Create secret while creating AWS S3 target
Please use one of the Target examples provided in the Custom Resource Definition section as a template for creating an NFS, Amazon S3, or any S3-compatible storage target.
Supported values for S3 vendors include:
An Amazon S3 target example is provided below:
Create demo-s3-target on AWS using above created secret
demo-s3-target created
Note: With the above configuration, the target would get created in the current user namespace unless specified. Also, additional information on Bucket permissions can be found here: AWS S3 Target Permissions
Step 3: Create a Retention Policy (Optional)
While the example backup custom resources created by following this Getting Started page can be deleted manually via kubectl commands, Trilio also provides backup retention capability - to automatically delete the backups based on defined time boundaries.
Create demo-retention-policy
Retention policy created successfully
A retention policy is referenced in the backupPlan CR.
Note: With the above configuration, the policy would get created in the default namespace unless specified.
Step 4: Create a BackupPlan
This section focuses on creating a BackupPlan to define and manage application backups. A BackupPlan specifies which resources to back up, such as specific applications or namespaces, and can be configured using labels, Helm, Operators, or namespaces.
This section demonstrates creating a BackupPlan to back up a sample application using label-based selection.
The following steps will be performed.
1. Deploy a sample application
Deploy a sample application, such as MySQL, and assign unique, identifiable labels. These labels will appear under the "Labels" tab in the "Application" section. Refer to the guide here for detailed instructions.
2. Create a Label-Based BackupPlan
Create a BackupPlan CR through the management console, specifying the MySQL application by selecting its labels from the UI in the same namespace where the application is deployed.
Select application deployed by label app:mysql and create new BackupPlan
Step 4.2: Helm Example
This section outlines the steps to create a BackupPlan for a sample application deployed via Helm.
The following steps will be performed.
1. Deploy a Sample Application Using Helm
Deploy a sample Helm application, such as CockroachDB. Trilio will display installed Helm applications under the "Helm and Operators" tab in the "Application" section.
Refer to the guide here for detailed instructions.
2. Create a Helm-Based BackupPlan
Create a BackupPlan Custom Resource (CR) through the management console, specifying the Helm release of the CockroachDB application in the BackupPlan Helm section.
Ensure the name of the release you specify matches the output from the helm ls command in the previous step.
Enter backupplan name and select target repository. Cockroachdb helm release is part of the backupplan
Step 4.3: Operator Example
This section provides steps for creating a BackupPlan for a sample ETCD operator application.
Install the Etcd Operator and deploy an Etcd cluster. Trilio will display installed operator applications under the "Helm and Operators" tab in the "Application" section. Refer to the guide here for detailed instructions.
2. Create a Operator-Based BackupPlan.
Create a BackupPlan resource to back up the etcd-operator and its clusters. Use the management console to select the etcd-operator, which is automatically discovered by T4K and listed under the Operator section.
Create a backupplan for auto-discovered etcd operator. etcd operator resources captured as a part of backupplan
Step 4.4: Virtual Machine Example
This section outlines the process of creating a BackupPlan for a sample Virtual Machine.
Steps to perform:
1. Deploy a Sample VirtualMachine
Deploy a sample Virtual Machine (VM) using the OpenShift Virtualization Operator. To learn about VM deployment, refer to the Red Hat demo linked here. Trilio will list installed VMs under the "Virtual Machines" section. For more detailed instructions, see the guide here.
2. Create a BackupPlan For VirtualMachine
Create a BackupPlan Custom Resource (CR) through the management console, specifying the Virtual Machine for backup. Ensure that the name of the Virtual Machine specified matches the VM created in the previous step.
Virtual Machine auto-discovered by the Trilio for Kubernetes. Create New Backup for Virtual Machine. Provide Backupplan name, Target, and other details. Provide Scheduling Policy, and Retention Policy for the BackupPlan. Virtual Machine Parameters are added under the Custom Component Details.
Step 4.5: Namespace Example
This section outlines the process of creating a BackupPlan for a k8s namespace.
Use Helm to deploy a WordPress application into the wordpress namespace.
Trilio lists the namespaces available in the cluster under the Namespaces section. For detailed instructions, refer to the guide here.
2. Create a BackupPlan for a Namespace
Create a BackupPlan Custom Resource (CR) through the management console, specifying the wordpress namespace for backup.
Auto-discovered namespaces. Create demo-ns-backupplan. demo-ns-backupplan is in Available state
Step 5: Create Backup
Create a Backup CR through the UI to protect the BackupPlan. The backup can be of type Full or Incremental.
Note: The first backup into a target location will always be a Full backup.
Steps to perform
Select the backupPlan either from the "Backup Plans" tab from the UI and select the "Create Backup" option from the dropdown.
Or by choosing the application from the "Applications" section, the namespace from the "Namespaces" section, or the VM from the "Virtual Machines" section. And by clicking the "Create Backup" option in the UI.
The available BackupPlans for the selected application will be displayed.
Select the desired BackupPlan and proceed with creating the backup.
Refer to this example for backing up a Helm application.
The backup details can be viewed by selecting the "View Details" option from the dropdown in the backup details section.
demo-cockroachdb-helm-backup is in Available state
Step 6: Create Snapshot
Create a Snapshot CR through the UI to protect the BackupPlan. The snapshots are always created as Full snapshots.
Steps to perform
Select the backupPlan either from the "Backup Plans" tab from the UI and select the "Create Snapshot" option from the dropdown.
Or by choosing the application from the "Applications" section, the namespace from the "Namespaces" section, or the VM from the "Virtual Machines" section. And by clicking the "Create Snapshot" option in the UI.
The available BackupPlans for the selected application will be displayed.
Select the desired BackupPlan and proceed with creating the snapshot.
Refer to this example for taking a snapshot of a Virtual Machine.
The snapshot details can be viewed by selecting the "View Details" option from the dropdown in the snapshot details section.
demo-snapshot is in Available state
Step 7: Restore the Application Using a Backup or Snapshot
Finally, create the Restore CR using the UI to restore the backup or snapshot, either in the same or a different namespace.
Restore to the same cluster in a same namespace
Note: If restoring into the same namespace, ensure that the original application components have been removed. Especially the PVC of the application is deleted.
Restore to the same cluster but a different namespace
Note: If restoring into another namespace in the same cluster, ensure that the resources that cannot be shared, for example, ports - should be available or transformation should be used to avoid conflict. More information about transformation can be found at Restore Transformation.
Before restoring the app in the same cluster, the existing app must be removed if it has cluster-scoped resources. This is necessary to prevent conflicts with cluster-level resources that could interfere with the restore operation.
Restore from Backup
Steps to perform
Select the backup by choosing "View Backup and Restore Summary" from the dropdown in the application selection.
Then, choose the "Restore" option to restore the backup.
See this example for restoring an operator backup.
Select the backup created above from the Restore Points. Enter the restore name and select the restore namespace. demo-etcd-operator-restore is in-progress state
Refer to this example for a completed restore status.
Restore is in Completed state
Restore from Snapshot
Steps to perform
Select the snapshot by choosing "View Backup and Restore Summary" from the dropdown in the application selection.
Then, choose the "Restore" option to restore the snapshot.
See this example for restoring an namespace snapshot.
Step 8: Restore the Application to a Different Cluster
Trilio enables application backups to be restored into a different cluster. This section focuses on the process of restoring a backup to a different cluster.
Note: If restoring to another cluster (migration scenario), ensure that Trilio for Kubernetes is also running in the remote namespace/cluster. To restore into a new cluster (where the Backup CR does not exist), the same target should be created and Target Browsing should be enabled to browse the stored backups.