To create backups of your cluster, or to restore a cluster from a backup, first you must enable the backup service on the cluster. Note that enabling the backup service involves scheduling automatic backups and creating an initial backup. The backup service runs on the cluster itself, not on Pipeline.

Prerequisites 🔗︎

  • An existing object store bucket on one of the supported providers, for example, Amazon S3.
  • A secret to access and write this object store must be available in Pipeline. See Creating secrets in Pipeline for details.
  • Your cluster secret must have access permissions to manage volume snapshots, or you must add these permissions to your node instance role. For details, see the documentation of the Velero plugin for AWS, Azure, or GCP.

Limitations 🔗︎

  • You can back up and restore clusters running on Amazon AWS, Google Cloud Platform, and Microsoft Azure. If you need to create backups of clusters running at another cloud provider, contact us.
  • Backups are provider specific. This means that you can create backups of a cluster to an object store of a different provider, you can only restore this backup to its original provider.
  • Currently you can create backups of a cluster to a single object storage, multiple backup destinations are not supported.

Enable backups on the web UI 🔗︎

  1. Navigate to Main Menu > Cluster Management, then the cluster you want to configure. A sidebar opens.

  2. In the sidebar, click DETAILS.

  3. Select Backups > CREATE. Enable backups

  4. Configure an automatic backup. Select how often you want to back up your cluster in the SCHEDULE field, and also how long you want to KEEP THE BACKUPS FOR.

    Note: The starting time of the backup is the time when you enable the backup service. Currently this can be modified only by manually modifying the related resource.

    Configure scheduled backup

  5. Configure the storage to store the backups. Select the CLOUD provider to use, and the SECRET you can use the access the object storage at the provider. Then select an existing object storage bucket, or create a new one. Create a bucket

  6. Click ENABLE. The backup service is enabled, and a backup is started immediately. To check the progress of the backup, select Main Menu > Disaster Recovery. List backups

    Note: The logs of the backup are saved in the object storage bucket where the backup is created. In case you need these logs for troubleshooting, you can access them from the CLI: connect to the cluster, then run the velero backup logs <BACKUP_NAME> --namespace pipeline-system command. For example: velero backup logs nkc2y5siwpuqk-20201030183445 --kubeconfig ~/Downloads/nkc2y5siwpuqk.yaml --namespace pipeline-system

Enable backups from the CLI 🔗︎

To enable the backup service from the CLI, complete the following steps.

  1. Connect to the cluster you want to backup.

  2. Run the banzai cluster service backup enable command, then follow the interactive on-screen instructions to schedule an automatic backup and specify an object storage. If your cluster secret has permissions to make volume snapshots, you can deploy the secret with the backup. If your node instance role has these permissions, you do not have to deploy the secret.

    $ banzai cluster service backup enable
    ? Schedule backups for every  [Use arrows to move, type to filter, ? for more help]
    > daily
    weekly
    monthly
    ? Keep backups for  [Use arrows to move, type to filter, ? for more help]
    > 1 day
    2 days
    1 week
    ? Select storage provider:  [Use arrows to move, type to filter, ? for more help]
    > Amazon S3
    Azure Blob Storage
    Google Cloud Storage
    ? Provider secret:  [Use arrows to move, type to filter]
    > my-aws-secret
    ? Bucket name:  [Use arrows to move, type to filter]
    > my-backup-bucket
    ? Deploy cluster secret to give access for Velero to make volume snapshots [? for help] (y/N)
    INFO[0222] Enabling backup service for [289] cluster
    
  3. The backup service is enabled, and a backup is started immediately. Run the following command to check the progress of the backup:

    $ banzai cluster service backup list
    ID  Name                           Cloud   Distribution  TTL      ExpireAt              Status
    24  cluster-backup-20201027084946  amazon  pke           24h0m0s  2020-10-28T08:49:46Z  Completed
    

    Note: The logs of the backup are saved in the object storage bucket where the backup is created. In case you need these logs for troubleshooting, you can access them from the CLI: connect to the cluster, then run the velero backup logs <BACKUP_NAME> --namespace pipeline-system command. For example: velero backup logs nkc2y5siwpuqk-20201030183445 --kubeconfig ~/Downloads/nkc2y5siwpuqk.yaml --namespace pipeline-system