Is data compatible between Couchbase Server 4.5 and 4.6?


Can someone tell me if Couchbase data created with Server 4.5 is compatible with 4.6 and vice versa?

When I create a database with 4.5.1 then upgrade to 4.6.0 and start Couchbase Server, I can see the buckets but they appear to be corrupt. Using the Web interface, the icon in Data buckets->Data nodes is amber and if I open the document list I get the following error: ```Error: unknown error ({exit,{{bad_return_value,{stop,{error,couldnt_connect_to_memcached}}}, {gen_server,call, [{‘ns_memcached-testversions’,‘ns_1@’}, {get_keys,[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18, 19,20,21,22,23,24,25,26,27,28,29,30,31,32,33, 34,35,36,37,38,39,40,41,42,43,44,45,46,47,48, 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63], [{include_docs,true}, {inclusive_end,true}, {limit,6}, {start_key,undefined}, {end_key,undefined}]}, infinity]}}})

The reverse situation is even worse: If I create a cluster/bucket/doc on 4.6.0 then try to open this on 4.5.1, couchbase server appears to start but I can't even open the web interface.

Is the data known to be incompatible between these two versions?


Data in the Data Service (i.e. the documents in your bucket) should always be forwards compatible; i.e. you should be able to upgrade from 4.5 to 4.6 and access the data.

If the node is amber then that means it’s still pending (i.e. warming up). See the warmup documentation on how to monitor the state of warmup.

Hi @drigby, thanks for the reply. I have restarted and waited for 20 minutes (basically since reading your reply) but the icon is still amber. This is running on the local machine (a Macbook Pro with MacOS El Capitan) and there is a single bucket with no documents and no views/indexes (I just set it up this morning for this test). If I close and restart with 4.5.1 the icons turns green in a couple of seconds.

The command cbstats localhost:11210 warmup in the link that you sent gives the response Stats 'warmup' are not available from the requested engine. ([Errno 32] Broken pipe) Actually, any command to cbstats gives the same response, so I don’t think I’m running it correctly, or haven’t started stats or something. Do I need to do something to start collecting stats on MacOS?

Also, is it possible to downgrade from 4.6.0 to 4.5.1 or is this an unsupported path? This is actually the use case I encountered when I noticed this issue.


Try specifying the name of the bucket (-b <bucket>) to cbstats.

In general there’s no guarantee you can downgrade - data formats are only backwards compatible, not forward (i.e. old versions may not know how to read newer versions’ files).

Having said that, macOS is (a) not a supported production platform (so there’s even less guarantee about version mobility) and (b) generally needs to start with a clean slate (i.e. remove previous installation) - see the Installing on MacOS documentation.

If you want to downgrade you should backup your data using cbbackup, downgrade, then restore using cbrestore.

Try specifying the name of the bucket (-b ) to cbstats.

I tried this but got a “connection refused” error (Could not connect to localhost:11210: Connection refused).

Okay, understood about downgrading, thanks for clarifying. Upgrading is more important and was, for me, more worrying. I didn’t uninstall between versions. I’ll try this - do you think this could be the reason for my problems with upgrading as well? I’ll also try a similar test with Ubuntu using Docker.


That sounds like the memcached process isn’t running - which would explain the issues you are seeing.

Thanks @drigby, it looks like this is correct. However, it also looks like running with the data created by v4.5.1 is what kills it! If I restore my original data (created with v4.6.0) and restart Couchbase Server, I can run the cbstats command. I can also run ps and see the memcached process running. If I quit, restore the v4.5.1 data (by copying the old folder) and restart couchbase server, I can’t run cbstats and ps shows that memcached is not running! I guess this would then explain why I can open the document list in the bucket.

I’m not sure if there’s any way around this other than to do a proper backup and restore of data when either upgrading or downgrading, at least on Mac. I’m going to try a similar test on Ubuntu (which is our production system and so more important).


There’s certainly no way around it when downgrading - as I mentioned above there’s simply no guarantee that files created by a newer version can be used on an older version. (If I had to speculate, there’s probably some config file setting in the newer version which the older version doesn’t understand and hence fails to start up).

For production supported platforms (which Ubuntu is one of), upgrading is supported (within some limits of how far you can go in a single “jump” - see Upgrade Matrix

1 Like

I understand the limitation with downgrading. It’s not really a problem as it isn’t something you would need to do very often (only if you find a problem in the newer version) and so in the rare occasions when you do, a backup and restore is not unreasonable.

Unfortunately it also seems to be the case with upgrading on MacOS, at least between these two versions, but as it’s not a production supported platform, I guess it’s the sort of thing that may happen sometimes.

I have also tried my test on Ubuntu, through Docker, and I was able to upgrade from 4.5.1 to 4.6.0 successfully keeping the same data (though not the other way around), which is expected and good news.