I need to remove all docs from a bucket but i would like to save all my user to restore them in a new once. I can manage design_docs to backup views but i don’t undertand how to do the same with the users.
I used this command to backup:
/opt/couchbase/bin/cbbackup http://127.0.0.1:8091 test/ -u Administrator -p password -b mybucket0 -k '_sync:user*'
And this to restore:
/opt/couchbase/bin/cbrestore test/ http://127.0.0.1:8091 --bucket-source=mybucket0 --bucket-destination=mybucket1
Is this the correct way?
On file backuped i see:
"sequence":131980
and "rolesSince":{"tecnici":131978}
Can i reset them?
Attempting to back up and restore just the _sync:user docs isn’t recommended. Sync Gateway user documents include sequence information - migrating these documents without the rest of the bucket contents will result in unpredictable behaviour.
Thanks @adamf
So, how i can restore an user with the same password?
i have already sent to 87 users their password to test our application, and they used it for 2 weeks.