This is unreleased documentation for SUSE® Storage 1.12 (Dev).

Restore the SUSE® Storage System

Longhorn System Restore Rollouts

  • SUSE Storage restores the resource from the Longhorn System Backup Bundle.

  • SUSE Storage does not restore existing Volumes and their associated PersistentVolume and PersistentVolumeClaim.

  • SUSE Storage automatically restores a Volume from its latest backup.

  • To prevent overwriting eligible settings, SUSE Storage does not restore the ConfigMap/longhorn-default-setting.

  • SUSE Storage does not restore configurable settings.

  • Since SUSE Storage does not back up V2 Data Engine backing images, you must ensure that those images are available in the cluster before you restore the Longhorn system. This allows SUSE Storage to restore volumes that use V2 Data Engine backing images.

Limitations

Restore Path

SUSE Storage does not support cross-major or minor version system restore except for upgrade failures, ex: 1.4.x -> 1.5.

Create Longhorn System Restore

You can restore the Longhorn system using SUSE Storage UI. Or with the kubectl command.

Prerequisite

  • A running Longhorn cluster for SUSE Storage to roll out the resources in the system backup bundle.

  • Set up the Nodes and disk tags for StorageClass.

  • Have a Longhorn system backup.

  • All existing Volumes are detached.

Using SUSE Storage UI

  1. Go to the System Backups page in the Backup and Restore.

  2. Select a system backup to restore.

  3. Click Restore in the Operation drop-down list.

  4. Give a Name for the system restore.

  5. The system restore starts and show the Completed state when done.

Using kubectl Command

  1. Find the SUSE Storage SystemBackup to restore.

    > kubectl -n longhorn-system get systembackup
    NAME     VERSION   STATE   CREATED
    demo     v1.4.0    Ready   2022-11-24T04:23:24Z
    demo-2   v1.4.0    Ready   2022-11-24T05:00:59Z
  2. Execute kubectl create to create a SUSE Storage SystemRestore of the SystemBackup.

    apiVersion: longhorn.io/v1beta2
    kind: SystemRestore
    metadata:
      name: restore-demo
      namespace: longhorn-system
    spec:
      systemBackup: demo
  3. The system restore starts.

  4. The SystemRestore change to state Completed when done.

    > kubectl -n longhorn-system get systemrestore
    NAME           STATE       AGE
    restore-demo   Completed   59s

Delete Longhorn System Restore

Deleting the SystemRestore also deletes the associated job and abort the remaining resource rollouts. You can Restart the Longhorn System Restore to roll out the remaining resources.

You can abort or remove a completed Longhorn system restore using SUSE Storage UI. Or with the kubectl command.

Using SUSE Storage UI

  1. Go to the System Backups page in the Backup and Restore.

  2. Delete a single system restore in the Operation drop-down list next to the system restore. Or delete in batch with the Delete button.

Using kubectl Command

  1. Execute kubectl delete to delete a SUSE Storage SystemRestore.

    > kubectl -n longhorn-system get systemrestore
    NAME           STATE       AGE
    restore-demo   Completed   2m37s
    
    > kubectl -n longhorn-system delete systemrestore/restore-demo
    systemrestore.longhorn.io "restore-demo" deleted

Restart Longhorn System Restore

Configurable Settings

Troubleshoot

System Restore Hangs

  1. Check the longhorn-system-rollout Pod log for any errors.

    > kubectl -n longhorn-system logs --selector=job-name=longhorn-system-rollout-<SYSTEM-RESTORE-NAME>
  2. Resolve if the issue is identifiable, ex: remove the problematic restoring resource.

  3. Restart the Longhorn system restore.