aws s3 couchbase backup
How to Back Up Couchbase to AWS S3
Backing up your Couchbase database is crucial for securely storing your data and preparing for disaster scenarios. AWS S3 (Amazon Simple Storage Service) is an ideal cloud storage solution for these backup operations. Here are the steps to back up your Couchbase data to AWS S3:
1. Creating an AWS S3 Bucket
First, you need to create a bucket in AWS S3 where your backups will be stored:
• Log in to the AWS console.
• Go to the S3 service and click on the “Create Bucket” button.
• Choose a bucket name and select an appropriate region.
• Configure the bucket settings and create it.
2. Backing Up Couchbase to AWS
You can use Couchbase’s CLI tool (cbbackupmgr) to back up your database. Below are the commands you can use
You must first configure a backup archive on AWS S3 with the cbbackupmgr command:
cbbackupmgr config --archive s3://test-ibrahims3/test-backup -r repo --obj-staging-dir staging --obj-region us-east-1 --obj-acces-key-id ** --obj-secret-access-key **
After configuration, you can perform the backup:
cbbackupmgr backup --archive s3://test-ibrahims3/test-backup -r repo --obj-staging-dir staging --obj-region us-east-1 --obj-access-key-id ** --obj-secret-access-key ** -c http://127.0.0.1:8091 -u Administrator -p toortoor
To list backups:
cbbackupmgr info --archive s3://test-ibrahims3/test-backup -r repo --obj-staging-dir staging --obj-region us-east-1 --obj-access-key-id ** --obj-secret-access-key **
To delete backups:
cbbackupmgr remove --archive s3://test-ibrahims3/test-backup -r repo --obj-staging-dir staging --obj-region us-east-1 --obj-access-key-id ** --obj-secret-access-key ** --backups 2024-08-27T15_04_32.405427012Z