Search code examples
nosqlbackupcouchbaserestorecouchbase-bucket

Couchbase backup and restore from cbbackupmgr


I am taking couchbase cluster backup from cbbackupmgr command daily. I scheduled cron job one month ago and just observed when first day backup happened from cbbackupmgr command created file size is in GB. Now file creating in MB after first day till now so what I am observing here cbbackupmgr is taking incremental backup right? my question is if I required to restore from cbbackupmgr so which backup needs to use? or need to merge all those backups then can only restore the complete data without any loss?

please clarify my confusion.

Thanks.


Solution

  • You don't need to merge before the restore. You can directly from the incremental backup repository. There are two optional command line parameters you can make use of.

    --start (backup)

    The name of the first backup in the backup repository to restore or an index value which references an incremental backup. Valid index values are any positive integer, "oldest", and "latest". If a positive integer is used then it should reference the index of the incremental backup starting from the oldest to the most recent backup. For example, "1" corresponds to the oldest backup, "2" corresponds to the second oldest backup, and so on. Specifying "oldest" means that the index of the oldest backup should be used and specifying "latest" means the index of the most recent backup should be used. If this flag is not specified then the restore will start with the oldest backup in the backup repository.

    --end (backup)

    The name of the last backup in the backup repository to restore or an index value which references an incremental backup. Valid index values are any positive integer, "oldest", and "latest". If a positive integer is used then it should reference the index of the incremental backup starting from the oldest to the most recent backup. For example, "1" corresponds to the oldest backup, "2" corresponds to the second oldest backup, and so on. Specifying "oldest" means that the index of the oldest backup should be used and specifying "latest" means the index of the most recent backup should be used. If this flag is not specified then the restore will end with the most recent backup in the backup repository.