Couchbase With Wasabi
    • 13 Aug 2024
    • 2 Minutes to read
    • PDF

    Couchbase With Wasabi

    • PDF

    Article summary

    Couchbase Server is an open source, distributed, JSON document database. It is certified for use with Wasabi. For more information on the Couchbase Server - Wasabi cloud backup solution, refer to cbbackupmgr cloud.

    To use this product with Wasabi, ensure that you are running the Couchbase Server 6.6 (or newer) release and follow the steps below.
    This configuration example discusses the use of Wasabi's us-east-1 storage region. To use other Wasabi storage regions, use the appropriate Wasabi service URL, as described in Service URLs for Wasabi's Storage Regions.

    Couchbase Server enables you to store archives directly to the cloud. Backing up directly to an external cloud provider requires permissions to access the given data store. This guide will highlight how to provide static configuration and credentials using the following cli flags.

    • obj-access-key-id - (Wasabi Access Key)
    • obj-region – Region where your bucket is in Wasabi (i.e. us-east-1)
    • obj-secret-access-key - (Wasabi Secret Key)

    Configuring Cloud Backups

    Begin by creating a backup archive in object store. This can be done with the configuration command and only needs to be done once. All other commands will automatically download the archive metadata in the directory provided using the obj-staging-dir argument before performing any operations (this is done regardless of whether or not the archive exists locally to ensure that the archive in the staging directory is up to date). Below is an example of how to configure an archive in Wasabi Cloud Storage.

    $ cbbackupmgr config -a s3://your_bucket/archive -r repo --obj-staging-dir /mnt/staging/wasabi --obj-region us-east-1 --obj-endpoint https://s3.wasabisys.com -- obj-access-key-id <Insert Access Key> --obj-secret-access-key <Insert Secret Key>
    
    Backup repository `repo` created successfully in archive `s3://your_bucket/archive`
    Although it is possible to have cbbackupmgr coexist in the same S3 bucket as other generalpurpose storage, Wasabi recommends using a bucket in which cbbackupmgr has exclusive access.

    Backing Up a Cluster

    Once an archive is configured, performing a backup works similarly to performing a local backup. Note that when backing up directly to S3, a certain amount of local disk space will be used to stage local metadata files and storage indexes. For more information, review the the Staging Directory section in cbbackupmgr cloud. Below is an example of a backup that stores directly in a Wasabi S3 bucket.

    $ cbbackupmgr backup -a s3://your_bucket/archive -r repo --obj-staging-dir /mnt/staging/wasabi --obj-region us-east-1 --obj-endpoint https://s3.wasabisys.com --obj-access-key-id <Insert Access Key> --obj-secret-access-key <Insert Secret Key> -c http://localhost:8091 -u Administrator -p password
    
    Copied all data in 1m2.525397237s (Avg. 51.61KB/Sec)      7303 items / 3.12MB
    
    beer-sample             [===========================================] 100.00%
    
    Backup successfully completed
    
    Backed up bucket "beer-sample" succeeded
    
    Mutations backedup; 7303, Mutations failed to backup: 0
    
    Deletions backedup: 0, Deletions failed to backup: 0
    Performing incremental backups works exactly as it would if you were performing an incremental backup locally. Rerun the above command to create an incremental backup.

    Below are examples of the backup in the Wasabi Management Console. 

    Restoring a Backup and Multiple Incremental Backups

    Below is an example of restoring a backup that is stored in Wasabi.

    $ cbbackupmgr restore -a s3://your_bucket/archive -r repo --obj-staging-dir /mnt/staging/wasabi --obj-region us-east-1 --obj-endpoint https://s3.wasabisys.com --obj-access-key-id <Insert Access Key> --obj-secret-access-key <Insert Secret Key> -c http://localhost:8091 -u Administrator -p password
    
    
    
    (1/1) Restoring backup 2020-03-19T15_35_00.467487218Z
    
    Copied all data in 28.048019272s (Avg. 103.21KB/Sec)     7303 items / 2.82MB
    
    beer-sample             [==========================================] 100.00%
    
    Restore bucket 'beer-sample' succeeded
    
    Mutations restored: 7303, Mutations failed to restore: 0
    
    Deletions restored: 0, Deletions failed to restore: 0
    
    Skipped due to purge number or conflict resolution: Mutations: 0 Deletions: 0
    
    Restore completed successfully