Sync Gateway does not import pre-existing documents



I’m trying to configure Sync Gateway to import existing document from my bucket but nothing is happening.
I’ve downloaded the latest sources for sync gateway from git and compiled an executable for windows.

This is my configuration file:

“importDocs”: true,
“sync”:function(doc) {channel(["public", "any"]);}

Here is the output when I start the sync gatway:

C:sync_server>sync_gateway.exe -verbose config.json
13:38:49.648896 Enabling logging: [REST HTTP]
13:38:49.649896 ==== Couchbase Sync Gateway/0.91 ====
13:38:49.649896 Configured Go to use all 8 CPUs; setenv GOMAXPROCS to override this
13:38:49.650896 Opening db /beer as bucket "beer-sample", pool "default", server 
13:38:49.651896 Opening Couchbase database beer-sample on 
13:38:49.734901 Recomputing document channels...
2014/01/09 13:38:50 Go-Couchbase: Call to ViewCustom("sync_housekeeping", "import") took 471.027ms
13:38:50.210928 Starting admin server on :4985
13:38:50.211928 Starting server on :4984 ...

After starting the Sync Gateway I open documents in Couchbase Console and documents are not modified and there is no _sync property.

Thanks in advance,


Hi there, this is a known limitation that we are currently working on ( Ongoing progress has been checked in and is available in the latest development branch (i.e., master), and some initial documentation on this first phase of work available here:



thanks for the quick response. I know about these limitations and I downloaded the latest from git because I saw it has already been implemented:

I’ve put importDocs property in my configuration and I can see things happening in the log:

2014/01/09 13:38:50 Go-Couchbase: Call to ViewCustom(“sync_housekeeping”, “import”) took 471.027ms

But still it seems nothing is happening.


Hi — please file an issue in the sync_gateway Github repo, including all the relevant info (as above). Thanks.


I opened a ticket and got a replay. The importDocs option has been recently renamed in the repository to import_docs. Now it works fine.