Hi @househippo, many thanks for the fast answer and for the shared example!
I tried to map a scope and a collection, but I’m noticing some limitation.
I’m creating a replication to push docs in the specified source collection by Inter-SyncGateway Replication.
After setting the replication, I see in the logs the following WRN:
2023-05-11T12:56:16.963Z [INF] Replicate: c:sgr-mgr- db:dummy_bucket Initializing replication test31-scope-coll
2023-05-11T12:56:16.963Z [DBG] Replicate+: c:sgr-mgr- db:dummy_bucket couldn’t find existing local checkpoint for ID “_sync:m_dummy_bucket:sgrStatus:sgr2cp:pull:test31-scope-coll”
2023-05-11T12:56:16.964Z [DBG] Replicate+: c:sgr-mgr- db:dummy_bucket couldn’t find existing local checkpoint for ID “_sync:m_dummy_bucket:sgrStatus:sgr2cp:push:test31-scope-coll”
2023-05-11T12:56:16.964Z [INF] Replicate: c:sgr-mgr- db:dummy_bucket Couldn’t load initial replication status for “test31-scope-coll”: Replication status not found - stats will be reset
2023-05-11T12:56:16.964Z [WRN] c:sgr-mgr- db:dummy_bucket Error initializing replication default collection is not configured on this database: %!v(MISSING) – db.(*sgReplicateManager).RefreshReplicationCfg() at sg_replicate_cfg.go:811
The replication is in running state, but I’m not seeing any changes in the remote.
The database is configured as follows:
Add collections_enabled to your replication config, along with a list of collections_local you wish to replicate with the remote. You can omit collections_local if you want to replicate all collections.
Note the remote must already be configured with the set of collections being replicated.
Yes, you only need to specify collections_remote if your local and remote collections do not match in name. You can omit the property (or single items inside it) if your local and remote scopes/collections match in name.
I reuse this thread to ask if it’s possible to specify different scopes in the same database or there’s a need to specify multiple databases for different scopes in the same bucket.
If so, can you give me an example?