Skip to content
Browse files

MB-7200: Capture ddocs/views from all buckets

Change-Id: I0397227a57096e0f371bef26c20947e6473a64fb
Reviewed-on: http://review.couchbase.org/22661
Tested-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information...
1 parent 5211aec commit 48e86857b4bdd88043a96561f14ed7a0fd72da43 @bcui6611 bcui6611 committed with steveyen Nov 19, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 cbcollect_info
View
15 cbcollect_info
@@ -8,6 +8,7 @@ import subprocess
import string
import re
import platform
+import glob
USAGE = """usage: %prog [options] output_file.zip
@@ -422,6 +423,20 @@ def make_tasks(root="/opt/couchbase", dbdir=""):
AllOsTask("couchbase diags",
"curl -sS \"http://%s@127.0.0.1:8091/diag?noLogs=1\"" % (c),
log_file="diag.log"))
+
+ for f in os.listdir(dbdir):
+ path = os.path.join(dbdir, f)
+ #find bucket directory
+ if os.path.isdir(path) and f not in [".delete", "@indexes"]:
+ os.chdir(path)
+ files = glob.glob("master.couch.[0-9]*")
+ if files:
+ ddoc = sorted(files, key=lambda x: int(x.split(".")[-1]))[-1]
+ _tasks.append(
+ AllOsTask("couchbase design docs - bucket:%s" % f,
+ "couch_dbdump \"%s\"" % (os.path.join(path, ddoc)),
+ log_file="ddocs.log"))
+
return _tasks
def main():

0 comments on commit 48e8685

Please sign in to comment.
Something went wrong with that request. Please try again.