Local CBL database name vs. bucket name on server

14 views
Skip to first unread message

Brendan Duddridge

unread,
Nov 1, 2015, 4:34:11 AM11/1/15
to Couchbase Mobile
Hi,

Does the local CBL database name need to be the same as the bucket/database name on the server for syncing to work?

I'll have multiple local databases with different names that I want to sync with the same server. I was thinking that I would be able to use a channel name which matched the local database name in order to separate syncing of one database from another to the Sync Gateway. The local database file is generated from a UUID in the format:

db-91482904371743d0b23c8cc634714e6a.cblite2

I figured that if I created a channel called db-91482904371743d0b23c8cc634714e6a and granted a user access to that channel then that would facilitate syncing from the Sync Gateway to that particular iOS/Mac database instance. The user can have multiple different database instances each syncing independently. At least that's my hope.

Just wondering if I might come across any difficulties doing it this way or is it perfectly legit to do this?

Thanks,

Brendan

Jens Alfke

unread,
Nov 1, 2015, 11:54:02 AM11/1/15
to mobile-c...@googlegroups.com

On Nov 1, 2015, at 1:34 AM, Brendan Duddridge <bren...@gmail.com> wrote:

Does the local CBL database name need to be the same as the bucket/database name on the server for syncing to work?

No. The server has no idea what your local db name is, and the replicator doesn’t care what the remote URL is.

—Jens

Brendan Duddridge

unread,
Nov 1, 2015, 12:58:36 PM11/1/15
to Couchbase Mobile
Excellent!

Thanks,

Brendan
Reply all
Reply to author
Forward
0 new messages