Good news, DevOps: manual backups are now a thing of the past.

The new Couchbase Backup Service automates once-manual backup and restore tasks to give DevOps and Operations teams time to focus on more important and engaging work while keeping database operations running smoothly.

It runs in the cluster in Couchbase 7.0, and DevOps or the Couchbase administrator can schedule it to invoke periodic backups of data and indexes.

An Admin’s Life before the Backup Service

Couchbase has always had cbbackupmgr, a command-line application with a robust set of APIs to perform periodic or incremental backups, as well as full backups.

For example, you could do incremental backups Monday through Sunday, then merge the incremental backups to a full backup on Sunday. Or do incremental backups to be merged and a full backup on Sunday.

See the example below:

An example timeline for using the Couchbase Backup Service

Underlying these different backup combinations is a cron job or script to invoke the backup. Usually DevOps and/or a Couchbase administrator manually creates the script, schedules it and specifies where to put the backups – perhaps using cbbackupmgr to place those backups on the disk mounted to the host machine. This means you can use Amazon S3, Azure Blob or NAS storage for backups. Usually these scripts or cron jobs need to be maintained and source-controlled in Git. These are not trivial tasks.

What about restoring from backup? cbbackupmgr can restore from backup with the same CLI commands, and use filter keys so that only a targeted collection of documents can be restored to the cluster. cbbackupmgr also allows you to perform backup and restore with reference to buckets, scopes and collections.

If you’re managing tens (let alone hundreds) of clusters, the scripts and code quickly get complicated. Consider scheduling, for example: If clusters are located around the world, 1 a.m. Eastern Time could be peak traffic hours in Asia, and it would be a bad idea to run backups then. You have to consider how many clusters are where and when you should run backups on them.

What if there were a backup service invoked and run by Couchbase Server? Now there is.

Life with the New Backup Service

As a DevOps or Couchbase administrator, you can still use cbbackupmgr to perform most of the functions of the new Backup Service.

But do you really want to spend your days coding, running and maintaining backups and creating backup strategies – or be called at 3 a.m. to perform a restore? No, you don’t.

With the new Couchbase Backup Service you can:

    • Schedule backups
    • Run an immediate backup
    • Inspect backups
    • Delete backups
    • Inspect tasks
    • Merge backups
    • Perform an immediate merge
    • Restore backups
    • Pause backups
    • Archive repositories
    • Delete repositories
    • Import repositories
    • Inspect plans
    • Review scheduling options
    • Use cloud storage
    • Use the REST API

All these features are detailed in Couchbase documentation on managing backup and restore.

The Backup Service UI

The UI is intuitive and easy to use. Here’s the initial view:

The UI for the new Couchbase Backup Service

The Backup Wizard

The backup wizard enables admins, site reliability engineers and DevOps teams to create, edit and manage multiple backup plans for any scenario.

It removes the burden of checking code in and out, running scripts and manually changing scheduled backups. For example, if there’s a high-traffic event occurring during a specific period, you can establish a new plan or edit a current plan to steer backups around the traffic peaks to ensure the database is running at peak performance while completing automated backups.

The Select Plan dialog pictured below lets you create a new backup plan or edit an existing plan, as shown in the drop-down detail. Select your plan and click Next.

The plan preview in the Couchbase Backup Wizard

Selecting a plan for daily or hourly database backups in Couchbase

The next step is to create tasks for the Backup Service. The screenshot below shows how to name a task, establish the frequency of your task, set a start time for the task, and specify the days on which backups will take place. .


The tasks view in the Couchbase Backup Wizard

Using the checkbox at the bottom left of the Tasks dialog, you can also indicate whether this task creates a full or normal (incremental) backup.

The Task UI in the Couchbase Backup Service

Further Reading on the Backup Service

We’ve just touched on the basics of the Backup Service here.

Why take our word for it? Test it yourself:<br/ >Take Couchbase 7 for a test drive



Posted by James Powenski, Couchbase Senior Solutions Engineer

Couchbase Senior Solutions Engineer

Leave a reply