Couchbase Server 2.0 on Mac OS X uses a different number of configured vBuckets than the Linux and Windows installations. Because of this, backing up from Mac OS X and restoring to Linux or Windows, or vice versa, requires using the built-in Moxi server and the memcached protocol. Moxi will rehash the stored items into the appropriate bucket.
Backing Up Mac OS X and Restoring on Linux/Windows
To backup the data from Mac OS X, you can use the standard cbbackup tool and options:
shell> cbbackup http://Administrator:password@mac:8091 /macbackup/todayTo restore the data to a Linux/Windows cluster, you must connect to the Moxi port (11211) on one of the nodes within your destination cluster and use the Memcached protocol to restore the data. Moxi will rehash the information and distribute the data to the appropriate node within the cluster. For example:
shell> cbrestore /macbackup/today memcached://linux:11211 -b default -B defaultIf you have backed up multiple buckets from your Mac, you must restore to each bucket individually.
Backing Up Linux/Windows and Restoring on Mac OS X
To backup the data from Linux or Windows, you can use the standard cbbackup tool and options:
shell> cbbackup http://Administrator:password@linux:8091 /linuxbackup/todayTo restore to the Mac OS X node or cluster, you must connect to the Moxi port (11211) and use the Memcached protocol to restore the data. Moxi will rehash the information and distribute the data to the appropriate node within the cluster. For example:
shell> cbrestore /linuxbackup/today memcached://mac:11211 -b default -B defaultTransferring Data Directly
You can use cbtransfer to perform the data move directly between Mac OS X and Linux/Windows clusters without creating the backup file, providing you correctly specify the use of the Moxi and Memcached protocol in the destination:
shell> cbtransfer http://linux:8091 memcached://mac:11211 -b default -B default shell> cbtransfer http://mac:8091 memcached://linux:11211 -b default -B default
These transfers will not transfer design documents, since they are using the Memcached protocol
Transferring Design Documents
Because you are restoring data using the Memcached protocol, design documents are not restored. A possible workaround is to modify your backup directory. Using this method, you first delete the document data from the backup directory, and then use the standard restore process. This will restore only the design documents. For example:
shell> cbbackup http://Administrator:password@linux:8091 /linuxbackup/todayRemove or move the data files from the backup out of the way:
shell> mv /linuxbackup/today/bucket-default/* /tmpOnly the design document data will remain in the backup directory, you can now restore that information using cbrestore as normal:
shell> cbrestore /linuxbackup/today http://mac:8091 -b default -B default