Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

Backup Fails

2 replies [Last post]
  • Login or register to post comments
Sun, 03/25/2012 - 08:05
jeffdyke
Offline
Joined: 11/16/2010
Groups: None

I've followed the docs for backing up a couchbase 1.8 server, and tweaked the paths for my installation, but the backup script continues to state it can not find the files.

Backkup command example is below, i started with mbbackup, which leads me to cbbackup, which ultimately just executes a python script and i've tried all three as well as running simply through sudo and as sudo -u couchbase. The examples show that data is in /var/opt, but using the latest .deb file from couchbase, they are installed/created in the paths below. I have also confirmed that the python script correctly finds sqlite3.

jeff@demo:/data/db/backups$ /opt/couchbase/lib/python/cbbackup /opt/couchbase/var/lib/couchbase/data/propjoe-data /data/db/backups/couchbase/
Error: unable to open database "/opt/couchbase/var/lib/couchbase/data/propjoe-data": unable to open database file

I am able to view the files in this directory:

jeff@demo:/data/db/backups$ ls -la /opt/couchbase/var/lib/couchbase/data/propjoe-data
total 2344
drwxr-xr-x 2 couchbase couchbase 4096 2012-03-25 10:51 .
drwxr-xr-x 15 couchbase couchbase 4096 2012-03-24 17:31 ..
-rw-r--r-- 1 couchbase couchbase 52224 2012-03-25 10:24 propjoe
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-0.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-0.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-0.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-1.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-1.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-1.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-2.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-2.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-2.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-3.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-3.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-3.mb-wal
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-25 10:51 propjoe-shm
-rw-r--r-- 1 couchbase couchbase 1058512 2012-03-25 10:51 propjoe-wal

Top
  • Login or register to post comments
Tue, 03/27/2012 - 02:37
toybuilder
Offline
Joined: 03/27/2012
Groups: None

try doing the cbbackup command as the couchbase user.
this took me a while to realize what was the problem, too. the cbbackup command should really have a usage message saying something about permissions...

Top
  • Login or register to post comments
Tue, 03/27/2012 - 05:24
jeffdyke
Offline
Joined: 11/16/2010
Groups: None

Thanks for the comment, but i had tried that, but only via sudo, this time i got a login as this user and tried it with the same results:

couchbase@demo:~$ /opt/couchbase/bin/cbbackup /opt/couchbase/var/lib/couchbase/data/propjoe-data /data/db/backups/couchbase/
Error: unable to open database "/opt/couchbase/var/lib/couchbase/data/propjoe-data": unable to open database file
Try backup propjoe-data again
^CTraceback (most recent call last):
File "/opt/couchbase/lib/python/cbbackup", line 67, in
backup(sqlite_path, dirname, dest_path, bucket_name)
File "/opt/couchbase/lib/python/cbbackup", line 37, in backup
time.sleep(sleep_time)
KeyboardInterrupt
couchbase@demo:~$ ls -la /opt/couchbase/var/lib/couchbase/data/propjoe-data
total 2344
drwxr-xr-x 2 couchbase couchbase 4096 2012-03-27 08:22 .
drwxr-xr-x 15 couchbase couchbase 4096 2012-03-24 17:31 ..
-rw-r--r-- 1 couchbase couchbase 52224 2012-03-27 06:59 propjoe
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-0.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-0.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-0.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-1.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-1.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-1.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-2.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-2.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-2.mb-wal
-rw-r--r-- 1 couchbase couchbase 307200 2012-03-24 17:41 propjoe-3.mb
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-24 17:41 propjoe-3.mb-shm
-rw-r--r-- 1 couchbase couchbase 0 2012-03-24 17:41 propjoe-3.mb-wal
-rw-r--r-- 1 couchbase couchbase 32768 2012-03-27 08:22 propjoe-shm
-rw-r--r-- 1 couchbase couchbase 1058512 2012-03-27 08:22 propjoe-wal

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker