Steps when you run Couch base on IP address and IP is changed

If the IP Address of Couch Base is changed then , it will not come up with new IP address and logs will show errors.
Server doesn’t come up on the new IP automatically because of the restriction due to security concerns.

In this administrator need to take backup of data on every node, then change IP address in couch base configuration for every node.

This will start the couch base server but no bucket data will be available.

By this method first step is to start every node and make the cluster again.

After this, create all required buckets and restore data on every node.

Next is to change configuration of each sync gateway and restart them.

Next change the upstream and IP address on Nginx (if IP of Nginx also changed) and restart it.

So following steps need to be executed for CouchBase server:-

  1. cd /opt/couchbase/bin
    Go to executables directory of CouchBase
  2. ./cbbackup couchstore-files:///opt/couchbase/var/lib/couchbase/data/ /mnt/backup-20120501
    Take backup of all buckets using file system on every node.
  3. cd /opt/couchbase/var/lib/couchbase/
    To change password for to configuration folder of CouchBase.
  4. nano ip_start
    Open ip_start and change the ip address.
  5. cd /opt/couchbase/bin
    Go to executables directory of CouchBase
  6. ./cbrestore /mnt/backup-20120501 http://Administrator:*******99@localhost:8091 --bucket-source=BucketName
    Restore backup for each bucket replace BucketName with the bucket name.

After these steps sync gateway and Nginx need to be reconfigured and restarted.

This will start your environment.

Pankaj Sharma

1 Like