Cbbackup unable to backup from file store reference after IP change

We are running couchbase server 3.0.1 on a single-node cluster. While setting up the server, the hostname was configured to This is the internal IP. The external IP was and using this ip we were connecting to couchbase console until now. When we tried using the Java sdk, it could not connect to the server. The reason turned out to be the conflict between the internal and external IPs; The server was not listening on the externally visible IP.
To fix this issue, I went to /opt/couchbase/var/lib/couchbase and changed the address in the file “ip_start” from to while the server was running. On restarting the server, it could not understand the change and couchbase web console took me to the server setup page instead of the login page. After this I stopped the server, changed the ip in the file “ip_start” back to and then started the server. Again the same problem occured and couchbase console took me to the server setup page.
I went to the data directory /opt/couchbase/var/lib/couchbase/data and found that the buckets and the users were intact.
From what I have read, I have to reconfigure the server to get it back up, which will delete all the data. I need to take a backup of the current data before I do that because I made the mistake of not taking backups earlier.

I tried ‘cbbackup’ sudo opt/couchbase/bin/cbbackup couchstore-files:///opt/couchbase/var/lib/couchbase/data/bucket1 /home/backup, but the following error occured.

error: no bucket subdirectories at: /opt/couchbase/var/lib/couchbase/data/bucket1

I’m getting the same error for all the buckets, but the documents are there in them. The buckets are not empty. Is there any workaround? How can I backup using file copies safely? Is there any other way to get the server configured properly without losing the data?
Any help regarding this would be appreciated. Thanks!

Could someone please shed some light on this problem? Our server has been down because of this problem and we need to fix it immediately. Any guidance towards the direction in which we should proceed would be greatly appreciated. Thanks! :slight_smile:

Hello there,

I had the same problem and I couldn’t replicate my bucket. I looked into the code of https://github.com/couchbase/couchbase-cli/blob/master/pump_sfd.py where there is the exception. It looks like you can’t backup only one bucket because of “bucket_dir in sorted(glob.glob(d + “/*/”)):”. If you set your data directory instead of your bucket directory, it will back up everything right.

I still need to try the restore though :smiley:

I hope it helps !


1 Like