Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For a robust storage mechanism, it is recommended that you back up the storage volumes at regular intervals. Adeptia Connect deployed through Adeptia Connect Rancher package helps you back up and restore the storage volumes by using Adeptia Connect Longhorn UI.

This section discusses the followings:

  • Creating a recurring backup schedule for the volume that you want to back up

  • Configuring the volume for backup

  • Restoring a backed up volume

Creating recurring backup schedule

If you want to back up a volume, it is best that you create a backup task that runs at regular intervals before configuring the target volume for backup. Follow the steps given below to achieve this.

Steps to mount additional storage

  1. Log in to the Rancher UI.

  2. Select Longhorn in the left panel, and then click Longhorn on Overview section.

  3. On the Longhorn UI, click Recurring Job Node on the top menu bar.

  4. On the Recurring Job Node screen, click Create Recurring Job.

  5. On the Create Recurring Job screen, do the followings:

    1. In the Name field, provide name for the Recurring Job.

    2. In the Task field, select Backup.

    3. In the Retain field, enter the number of replicas you want to create for the backup in Amazon S3.

    4. In the Concurrency field, define how many concurrent instances of the backup can run simultaneously.

    5. In the Cron field, define the frequency (using cron expression) at which the backup instance runs.

    6. Click Ok.

Configuring the volume for backup

Once you have created the Recurring Job, you can follow the steps given below to make a volume ready for backup.

    Anchorstep1step1Create a secret using the following Amazon S3 credentials:
    1. AWS_ACCESS_KEY_ID

    2. AWS_SECRET_ACCESS_KEY

  1. Select Longhorn in the left panel, and then click Longhorn on Overview section.

  2. On the Longhorn UI, go to Settings (on the top menu bar)> General.On the General go to the dropdown menu against the node to which you want to mount the additional storage, and then click Edit node and disks.

  3. On the Edit Node and Disks screen, do the followings:

    1. In the Backup Target field, enter the Amazon S3 endpoint in the following format:
      s3://<Amazon S3_bucket_name>@<AWS_region>/

    2. In the Backup Target Credential Secret field, enter the name of the Amazon S3 secret create in step 1.

  4. Click Volume on the top menu bar,

  5. On the Volume screen, select the volume that you want to back up.

  6. Click Create Backup.

    You can view the details related to the configured backup by clicking Backup on the top menu bar.

Restoring the backup

Follow the steps given below to restore a volume using a backup.

  1. Scale down all the pods that use the volume to be restored.

  2. Log in to the Rancher UI.

  3. Select Longhorn in the left panel, and then click Longhorn on Overview section.

  4. On the Longhorn UI, click Volume on the top menu bar.

  5. On the Volume screen, select the volume that you restore from the backup, and then click Delete.

  6.  Click Backup on the top menu bar.

  7. Select the backup that you want to restore, and then click Restore Latest Backup.

  8. In the Restore Backup window, do the followings:

    1. In the Name field, provide a name for the volume to be restored.
      Ensure that the volume name you provide is the same as that of the backup that you are going to restore.

    2. In the Number of Replicas field, enter the number of replicas you want to create for the restored volume.

    3. In the Access Mode field, select either of the two options based on your requirement.

      • ReadWriteOnce

      • ReadWriteMany

    4. Click Ok.

  9. Click Volume on the top menu bar.
    The restored volume can be seen in Detached state. To attach it to the nodes, do the followings:

    1. On the Volume screen, go to the dropdown menu against the restored volume, and then click Create PV/PVC.

    2. Scale up the pods that are going to use the restored volumeScroll down to the bottom of the screen and click Add Disk.

    3. In the Name field, enter a name for the storage disk that you want to add.

    4. In the Path field, enter the path, for example, /mnt/storage, where the disk is located.

    5. In the Storage Reserved field,enter the storage space (out of the total additional storage), that you want to keep reserved.
      It is recommended that you keep 20% of the total additional storage reserved for internal use.

    6. In the Scheduling field,select Enable to make the storage schedulable.

    7. Click Save.