Versions Compared

Key

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

...

  • 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.

  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 on the top menu bar.

  4. On the Recurring Job 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.

  1. Anchor
    step1
    step1
    Create a secret using the following Amazon S3 credentials:

    1. AWS_ACCESS_KEY_ID

    2. AWS_SECRET_ACCESS_KEY

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

  3. On the Longhorn UI, go to Settings (on the top menu bar)> General.

  4. On the General 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.

  5. Click Volume on the top menu bar,

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

  7. 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.

...