Restoring from different operating systems
Data is restored to an operating system that is different from the backup operating system, using the cbrestore tool with the restore=1 option.
Description
Couchbase Server on Mac OS X uses a different number of configured vBuckets than Linux and Windows installations. Because of this, restoring to Mac OS X from a Linux or Windows backup or restoring to Linux/Windows from a Mac OS X backup requires the rehash=1 option.
To backup the data (from any operating system), use the standard cbbackup tool and options.
For example, from Mac OS X:
cbbackup http://[Administrator]:[password]@[mac-hostname]:8091 /macbackup/today
For example, from Linux:
cbbackup [Administrator]:[password]@[linux-hostname]:8091 /linuxbackup/today
Syntax
To restore the data to a cluster with a different operating system, connect to the 8091 port, and use the rehash=1 option to rehash the information and distribute the data to the appropriate node within the cluster. rehash=1 rehashes the partition id's of each item. This is required when transferring data between clusters with a different number of partitions, such as when transferring data from a Mac OS X server to a non-Mac OS X cluster.
cbrestore backup
-u [username] -p [password]
-x rehash=1
http://[localhost]:8091 --bucket-source [my_bucket] --bucket-destination [my_bucket]