Adding multi-bucket support for cbbackup #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
While doing backups using
cbbackup
we have only two options when choosing thebucket_source
: either all buckets or only single bucket. So:all buckets
(which is default if you don't specify any buckets) we're getting the backup of all buckets, without option to choose which buckets you would like to skip.custom bucket
by adding arg-b bucket_name
we are limited to only one bucket per backup.Problem:
When having a custom list
-b bucket_1 -b bucket_2 -b bucket_3
of buckets that we want to backup, there is no option to specify them. We can automate this by a loop:and perform backup for each bucket separately, but this will create a new folder for each bucket with
timestamp
and other two subfolders. When having multiple Couchbase clusters, using the aforementioned loop and multiple folders would create a mess and would be hard to understand which backup (folder) is for which bucket.Steps to reproduce
In order to reproduce, you can run the following command:
cbbackup http://[host]:[port] /path/for/backup
-u [user] -p [password] -b bucket_1 -b bucket_2 -b bucket_3. What you will get is the backup for the last bucket specified, in our case backup for only
bucket_3`.Potential solution:
In this PR we are adding support for multiple buckets:
cbbackup http://[host]:[port] /path/for/backup -u [user] -p [password] -b bucket_1 -b bucket_2 -b bucket_3
. By doing this, user will be able to create single backup of multiple buckets in a single folder with the timestamp on it.