diff --git a/docs/user/README.md b/docs/user/README.md index 0d0e9ecb6..790e42e7b 100644 --- a/docs/user/README.md +++ b/docs/user/README.md @@ -32,6 +32,18 @@ The `awsnfsvolume.cloud-resources.kyma-project.io` CRD describes the AWS EFS instance that can be used as RWX volume in the cluster. To learn more, read the [AwsNfsVolume Custom Resource](./resources/04-20-10-aws-nfs-volume.md) documentation. +### AwsNfsVolumeBackup CR + +The `awsnfsvolumeBackup.cloud-resources.kyma-project.io` CRD describes the backup of an AWS EFS Filesystem. +To learn more, read the [AwsNfsVolumeBackup Custom Resource](./resources/04-110-10-aws-nfs-volume-backup.md) documentation. + + +### AwsNfsBackupSchedule CR + +The `awsnfsbackupschedule.cloud-resources.kyma-project.io` CRD describes the user-defined schedule for creating a backup +of the `AwsNfsVolume` instances at regular intervals. +To learn more, read the [AwsNfsBackupSchedule Custom Resource](./resources/04-120-10-aws-nfs-backup-schedule.md) documentation. + ### GcpNfsVolume CR The `gcpnfsvolume.cloud-resources.kyma-project.io` CRD describes the GCP Filestore diff --git a/docs/user/_sidebar.md b/docs/user/_sidebar.md index 64ed002cd..9451433a4 100644 --- a/docs/user/_sidebar.md +++ b/docs/user/_sidebar.md @@ -4,6 +4,8 @@ * [Resources](/cloud-manager/user/resources/README.md) * [IpRange](/cloud-manager/user/resources/04-10-iprange.md) * [AwsNfsVolume](/cloud-manager/user/resources/04-20-10-aws-nfs-volume.md) + * [AwsNfsVolumeBackup](/cloud-manager/user/resources/04-110-10-aws-nfs-volume-backup.md) + * [AwsNfsBackupSchedule](/cloud-manager/user/resources/04-120-10-aws-nfs-backup-schedule.md) * [GcpNfsVolume](/cloud-manager/user/resources/04-30-10-gcp-nfs-volume.md) * [GcpNfsVolumeBackup](/cloud-manager/user/resources/04-70-10-gcp-nfs-volume-backup.md) * [GcpNfsBackupSchedule](/cloud-manager/user/resources/04-30-30-gcp-nfs-backup-schedule.md) @@ -14,6 +16,8 @@ * [GcpRedisInstance](/cloud-manager/user/resources/04-60-gcp-redis-instance.md) * [Tutorials](/cloud-manager/user/tutorials/README.md) * [Use RWX Volumes in AWS](/cloud-manager/user/tutorials/01-10-aws-nfs-volume.md) + * [Backup RWX Volumes in AWS](/cloud-manager/user/tutorials/01-110-aws-nfs-volume-backup.md) + * [Create Scheduled Automatic RWX Volume Backups in AWS](/cloud-manager/user/tutorials/01-120-aws-scheduled-nfs-backup.md) * [Use RWX Volumes in GCP](/cloud-manager/user/tutorials/01-20-gcp-nfs-volume.md) * [Create VPC Peering in Azure](/cloud-manager/user/tutorials/01-30-azure-vpc-peering.md) * [Backup RWX Volumes in GCP](/cloud-manager/user/tutorials/01-70-gcp-nfs-volume-backup.md) diff --git a/docs/user/resources/04-110-10-aws-nfs-volume-backup.md b/docs/user/resources/04-110-10-aws-nfs-volume-backup.md new file mode 100644 index 000000000..a7c27f2c5 --- /dev/null +++ b/docs/user/resources/04-110-10-aws-nfs-volume-backup.md @@ -0,0 +1,49 @@ +# AwsNfsVolumeBackup Custom Resource + +The `awsnfsvolumebackup.cloud-resources.kyma-project.io` namespaced custom resource (CR) describes the AWS EFS Filesystem backup. +While the AWS EFS Filesystem backup is created in the underlying cloud provider subscription, it needs its source AWS +EFS Filesystem instance to be available. But upon its creation, it can be used independently of the source instance. + +For a given AWS EFS Filesystem, backups are incremental. This reduces latency on backup creation. +To learn more, read [EFS Filesystem Backup Creation](https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html). + +## Specification +This table lists the parameters of the given resource together with their descriptions: + +**Spec:** + +| Parameter | Type | Description | +|-----------------------------|---------------------|-------------------------------------------------------------------------------------------------------------------------------| +| **source** | object | Required. Specifies the source of the backup. | +| **source.volume** | object | Required. Reference of the existing source AwsNfsVolume that is backed up. | +| **source.volume.name** | string | Required. Name of the source AwsNfsVolume. | +| **source.volume.namespace** | string | Optional. Namespace of the source AwsNfsVolume. Defaults to the namespace of the AwsNfsVolumeBackup resource if not provided. | + +**Status:** + +| Parameter | Type | Description | +|-----------------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------| +| **state** | string | Signifies the current state of **CustomObject**. Its value can be either `Ready`, `Processing`, `Error`, `Warning`, or `Deleting`. | +| **conditions** | \[\]object | Represents the current state of the CR's conditions. | +| **conditions.lastTransitionTime** | string | Defines the date of the last condition status change. | +| **conditions.message** | string | Provides more details about the condition status change. | +| **conditions.reason** | string | Defines the reason for the condition status change. | +| **conditions.status** (required) | string | Represents the status of the condition. The value is either `True`, `False`, or `Unknown`. | +| **conditions.type** | string | Provides a short description of the condition. | + + +## Sample Custom Resource + +See an exemplary AwsNfsVolumeBackup custom resource: + +```yaml +apiVersion: cloud-resources.kyma-project.io/v1beta1 +kind: AwsNfsVolumeBackup +metadata: + name: my-backup +spec: + source: + volume: + name: my-vol + location: us-west1 +``` diff --git a/docs/user/resources/04-120-10-aws-nfs-backup-schedule.md b/docs/user/resources/04-120-10-aws-nfs-backup-schedule.md new file mode 100644 index 000000000..3a15eda45 --- /dev/null +++ b/docs/user/resources/04-120-10-aws-nfs-backup-schedule.md @@ -0,0 +1,70 @@ +# AwsNfsBackupSchedule Custom Resource + +The `awsnfsbackupschedule.cloud-resources.kyma-project.io` custom resource (CR) represents the user-defined schedule for creating a backup +of the `AwsNfsVolume` instances at regular intervals. The CR performs the following actions: +- Creates the backups by creating the `awsnfsvolumebackup.cloud-resources.kyma-project.io` resources at the specified interval. +- Enables you to specify days and times in the form of CRON expressions to automatically create the backups. +- Automatically deletes the backups when the backup reaches the configured maximum retention days value. +- Enables you to temporarily suspend or resume the backup creation/deletion. + +## Specification +This table lists the parameters of the given resource together with their descriptions: + +**Spec:** + +| Parameter | Type | Description | +|-----------------------------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **nfsVolumeRef** | object | Required. AwsNfsVolume reference. | +| **nfsVolumeRef.name** | string | Required. Name of the existing AwsNfsVolume. | +| **nfsVolumeRef.namespace** | string | Optional. The namespace of the existing AwsNfsVolume. Defaults to the namespace of the AwsNfsBackupSchedule resource if not provided. | +| **schedule** | string | Optional. CRON type expression for the schedule. When this value is empty or not specified, this schedule runs only once at the specified start time. See also [Schedule Syntax](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax). | +| **prefix** | string | Optional. Prefix for the name of the created `AwsNfsVolumeBackup` resources. Defaults to name of this schedule. | +| **startTime** | metav1.Time | Optional. Start time for the schedule. Value cannot be from the past. When not specified, the schedule becomes effective immediately. | +| **endTime** | metav1.Time | Optional. End time for the schedule. Value cannot be from the past or before the `startTime`. When not specified, the schedule runs indefinitely. | +| **maxRetentionDays** | int | Optional. Maximum number of days to retain the backup resources. If not specified, the backups are retained indefinitely. If `deleteCascade` is `true` for this schedule, then all the backups will be deleted when the schedule is deleted irrespective of this configuration value. | +| **suspend** | boolean | Optional. Specifies whether or not to suspend the schedule temporarily. Defaults to `false`. | +| **deleteCascade** | boolean | Optional. Specifies whether to cascade delete the backup resources when this schedule is deleted. Defaults to `false`. | + +**Status:** + +| Parameter | Type | Description | +|-----------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **state** (required) | string | Signifies the current state of **CustomObject**. Contains one of the following states: `Processing`, `Pending`, `Suspended`, `Active`, `Done` or `Error`. | +| **conditions** | \[\]object | Represents the current state of the CR's conditions. | +| **conditions.lastTransitionTime** | string | Defines the date of the last condition status change. | +| **conditions.message** | string | Provides more details about the condition status change. | +| **conditions.reason** | string | Defines the reason for the condition status change. | +| **conditions.status** (required) | string | Represents the status of the condition. The value is either `True`, `False`, or `Unknown`. | +| **conditions.type** | string | Provides a short description of the condition. | +| **nextRunTimes** | \[\]string | Provides the preview of the times when the next backups will be created. | +| **nextDeleteTimes** | map\[string\]string | Provides the backup objects and their expected deletion time (calculated based on `maxRetentionDays`). | +| **lastCreateRun** | string | Provides the time when the last backup was created. | +| **lastCreatedBackup** | objectRef | Provides the object reference of the last created backup. | +| **lastDeleteRun** | string | Provides the time when the last backup was deleted. | +| **lastDeletedBackups** | \[\]objectRef | Provides the object references of the last deleted backups. | +| **schedule** | string | Provides the cron expression of the current active schedule. | +| **backupIndex** | int | Provides the current index of the backup created by this schedule. | +| **backupCount** | int | Provides the the number of backups currently present in the system. | + +## Sample Custom Resource + +See an example AwsNfsBackupSchedule custom resource: + +```yaml +apiVersion: cloud-resources.kyma-project.io/v1beta1 +kind: AwsNfsBackupSchedule +metadata: + name: aws-nfs-backup-schedule + namespace: kyma-dev +spec: + nfsVolumeRef: + name: aws-nfs-sample-01 + namespace: kyma-dev + schedule: "0 0 * * *" + prefix: aws-nfs-daily-backup + startTime: 2024-11-01T00:00:00Z + endTime: 2025-12-31T00:00:00Z + maxRetentionDays: 365 + suspend: false + deleteCascade: true +``` diff --git a/docs/user/resources/README.md b/docs/user/resources/README.md index d1faaff59..2a677f978 100644 --- a/docs/user/resources/README.md +++ b/docs/user/resources/README.md @@ -3,6 +3,8 @@ Cloud Manager custom resources: * [IpRange Custom Resource](./04-10-iprange.md) * [AwsNfsVolume Custom Resource](./04-20-10-aws-nfs-volume.md) +* [AwsNfsVolumeBackup Custom Resource](./04-110-10-aws-nfs-volume-backup.md) +* [AwsNfsBackupSchedule Custom Resource](./04-120-10-aws-nfs-backup-schedule.md) * [GcpNfsVolume Custom Resource](./04-30-10-gcp-nfs-volume.md) * [GcpNfsVolumeBackup Custom Resource](./04-70-10-gcp-nfs-volume-backup.md) * [GcpNfsBackupSchedule Custom Resource](./04-30-30-gcp-nfs-backup-schedule.md) diff --git a/docs/user/tutorials/01-110-aws-nfs-volume-backup.md b/docs/user/tutorials/01-110-aws-nfs-volume-backup.md new file mode 100644 index 000000000..5b1c6cd05 --- /dev/null +++ b/docs/user/tutorials/01-110-aws-nfs-volume-backup.md @@ -0,0 +1,57 @@ +# Backup RWX Volumes in AWS + +This tutorial explains how to create backups for ReadWriteMany (RWX) volumes in Google Cloud Platform (AWS). + +## Preparation + +You have created a AwsNfsVolume. Follow [Use RWX Volumes in AWS](./01-10-aws-nfs-volume.md) to learn more. + +[!NOTE] +All the examples below assume that the AwsNfsVolume is named `my-vol` and is in the same namespace as the AwsNfsVolumeBackup resource. + +## Steps + +1. Export the namespace as an environment variable. Run: + + ```shell + export NAMESPACE={NAMESPACE_NAME} + ``` + +2. Create an AwsNfsVolumeBackup resource. + + ```shell + cat < + +* You have created a AwsNfsVolume. Follow [Use RWX Volumes in AWS](./01-10-aws-nfs-volume.md) to learn more. + +> [!NOTE] +> All the examples below assume that the AwsNfsVolume is named `my-vol` and is in the same namespace as the AwsNfsBackupSchedule resource. + +## Steps + +1. Export the namespace as an environment variable. Run: + + ```shell + export NAMESPACE={NAMESPACE_NAME} + ``` + +2. Create a AwsNfsBackupSchedule resource. + + ```shell + cat <