Book Image

Learning Couchbase

By : Henry Potsangbam
Book Image

Learning Couchbase

By: Henry Potsangbam

Overview of this book

This book achieves its goal by taking up an end-to-end development structure, right from understanding NOSQL document design to implementing full fledged eCommerce application design using Couchbase as a backend. Starting with the architecture of Couchbase to get you up and running, this book quickly takes you through designing a NoSQL document and implementing highly scalable applications using Java API. You will then be introduced to document design and get to know the various ways to administer Couchbase. Followed by this, learn to store documents using bucket. Moving on, you will then learn to store, retrieve and delete documents using smart client base on Java API. You will then retrieve documents using SQL like syntax call N1QL. Next, you will learn how to write map reduce base views. Finally, you will configure XDCR for disaster recovery and implement an eCommerce application using Couchbase.
Table of Contents (12 chapters)
Index

cbbackup


Note

Couchbase provides the cbbackup command to take a backup of the Couchbase system. This command enables you to back up an entire cluster, a single node, or a single bucket into a flexible backup structure that allows the restoration of data in the same or different clusters and buckets.

The backup files will be created on disk, and it's recommended to store it in a local disk only. Couchbase takes backups in the SQLite format. This format has some issues while writing to remote file systems. Hence, it's not recommended to direct the output of cbbackup to a remote file system.

Backing up all nodes and all buckets

The following command will initiate a full backup (the -m full option) of all the buckets in the cluster. The backup will be dumped in the D:/mybackup1509 folder:

cbbackup -m full http://10.72.47.31:8091 D:/mybackup1509

cbbackup – full backup

The preceding diagram displays the progress status when the backup is initiated.

If you want to take a differential backup, change the...