Wallaroo Backup and Restore with Velero Guide

How to use Velero in an installed Kubernetes cluster to back up and restore a Wallaroo instance

Once the Velero Installation Procedure and the Velero Kubernetes Install are complete, Wallaroo instance backups are performed through the following process:

  1. Before starting the backup, force the Plateau service to complete writing logs so they can be captured by the backup.

    kubectl -n wallaroo scale --replicas=0 deploy/plateau
    kubectl -n wallaroo scale --replicas=1 deploy/plateau
    
  2. Set the $BACKUP_NAME. This must be all lowercase characters or numbers or -/. and must end in alphanumeric characters.

    BACKUP_NAME={give it your own name}
    
  3. Issue the following backup command. The --exclude-namespaces is used to exclude namespaces that are not required for the Wallaroo backup and restore. By default, these are the namespaces velero, default, kube-node-lease, kube-public, and kube-system.

    This process will back up all namespaces that are not excluded, including deployed Wallaroo pipelines. Add any other namespaces that should not be part of the backup to the --exclude-namespaces option as per your organization’s requirements.

    velero backup create $BACKUP_NAME --default-volumes-to-fs-backup --include-cluster-resources=true --exclude-namespaces velero,default,kube-node-lease,kube-public,kube-system
    
  4. To view the status of the backup, use the following command. Once the Completed field shows a date and time, the backup is complete.

    velero backup describe $BACKUP_NAME
    Name:         doctest-20230315a
    Namespace:    velero
    Labels:       velero.io/storage-location=default
    Annotations:  velero.io/source-cluster-k8s-gitversion=v1.23.15
                velero.io/source-cluster-k8s-major-version=1
                velero.io/source-cluster-k8s-minor-version=23
    
    Phase:  Completed
    
    Errors:    0
    Warnings:  0
    
    Namespaces:
    Included:  *
    Excluded:  velero, default, kube-node-lease, kube-public, kube-system
    
    Resources:
    Included:        *
    Excluded:        <none>
    Cluster-scoped:  included
    
    Label selector:  <none>
    
    Storage Location:  default
    
    Velero-Native Snapshot PVs:  auto
    
    TTL:  720h0m0s
    
    CSISnapshotTimeout:  10m0s
    
    Hooks:  <none>
    
    Backup Format Version:  1.1.0
    
    Started:    2023-03-15 10:52:27 -0600 MDT
    Completed:  2023-03-15 10:52:49 -0600 MDT
    
    Expiration:  2023-04-14 10:52:27 -0600 MDT
    
    Total items to be backed up:  397
    Items backed up:              397
    
    Velero-Native Snapshots: <none included>
    
    restic Backups (specify --details for more information):
    Completed:  5
    

List Previous Wallaroo Backups

To list previous Wallaroo backups and their logs, use the following commands below:

  1. List backups with velero backup get to list all backups and their progress:

    velero backup get
    NAME                                    STATUS            ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
    doctest-20230315a                       Completed         0        0          2023-03-15 10:52:27 -0600 MDT   28d       default            <none>
    doctest-magicalbear-20230315            Completed         0        1          2023-03-15 11:52:17 -0600 MDT   
    
  2. Retrieve backup logs with velero backup logs $BACKUP_NAME:

    velero backup logs $BACKUP_NAME
    

Wallaroo Restore Procedure

To restore a from a Wallaroo backup:

  1. Set the backup name as the variable $BACKUP_NAME. Use the command velero backup get for a list of previous backups.

     velero backup get
     NAME                                    STATUS            ERRORS   WARNINGS   CREATED                         EXPIRES   STORAGE LOCATION   SELECTOR
     doctest-20230315a                       Completed         0        0          2023-03-15 10:52:27 -0600 MDT   28d       default            <none>
     doctest-magicalbear-20230315            Completed         0        1          2023-03-15 11:52:17 -0600 MDT   
    
     BACKUP_NAME={give it your own name}
    
  2. Use the velero restore create command to create the restore job, using the $BACKUP_NAME variable set in the step above.

    velero restore create --from-backup $BACKUP_NAME
    Restore request "doctest-20230315a-20230315105647" submitted successfully.
    Run `velero restore describe doctest-20230315a-20230315105647` or `velero restore logs doctest-20230315a-20230315105647` for more details.
    
  3. To check the restore status, use the velero restore describe command. The optional flag –details provides more information.

    velero restore describe doctest-20230315a-20230315105647 --details
    
  4. If the Kubernetes cluster does not have a static IP address assigned to the Wallaroo loadBalancer service, the DNS information may need to be updated if the IP address has changed. Check with the DNS Integration Guide for more information.