Backing up and restoring between platforms
Couchbase Server on Mac OS X uses a different number of configured vBuckets than the Linux and Windows installations. Backing up is a standard backup, however, 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.
Backing up Mac OS X and restoring on Linux/Windows
To backup the data from Mac OS X, use the standard cbbackup tool and options:
cbbackup http://Administrator:password@mac:8091 /macbackup/today
To restore the data to a Linux/Windows cluster, 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.
cbrestore backup
-u [username] -p [password]
-x rehash=1
http://[localhost]:8091 --bucket-source [my_bucket] --bucket-destination [my_bucket]
Backing up Linux/Windows and restoring on Mac OS X
To backup the data from Linux or Windows, use the standard cbbackup tool and options:
cbbackup http://Administrator:password@linux:8091 /linuxbackup/today
To restore to the Mac OS X node or cluster, 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 needed when transferring data between clusters with different number of partitions, such as when transferring data from a Mac OS X server to a non-Mac OS X cluster.
Syntax:
./cbrestore backup
-u [username] -p [password]
-x rehash=1
http://[localhost]:8091 --bucket-source [my_bucket] --bucket-destination [my_bucket]
Transferring data directly
The cbtransfer tool can be used to move data directly between Mac OS X and Linux/Windows clusters without creating the backup file.
cbtransfer http://linux:8091 http://mac:8091 -b [bucket-source] -B [bucket-destination] -x rehash=1
cbtransfer http://mac:8091 http://linux:8091 -b [bucket-source] -B [bucket-destination] -x rehash=1