*I'm not quite sure where to post this issue; I've tried it on GitHub - 
which seems to be the wrong place.*
*Afterwards I've posted this issue in the Couchbase Forums, but there seems 
to be no activity in this topic.*

*As I need to resolve this, I'm now trying my luck in this Google Group - 
and would be open for suggestions where to post which issues best ;)*

I'm trying to implement a user driven backup & restore functionality within 
my iOS app.
The basic steps to get to a solution are:

For backing up the database locally:

   1. Stop the sync process
   2. Close the connection to the currently used database
   3. Copy the *.cblite and the corresponding * attachments folder
   4. Open again the connection to the currently used database
   5. Kick off the sync process

To restore the database:

   1. Close the connection to the currently used database
   2. Replace the currently used database with a backup done before
   3. Open the connection to the just restored database
   4. *Create new revisions of every document in the restored database to 
   force the client's data be synced to the server - how? (see below)*
   5. *Kick of the sync process*
   6. *Doe some sort of cleanup after the initial sync - how? (see below)*

Unfortunately I have no clue, how to create new revisions of each document 
without modifying it's data. How could this be done?

Also I think I have to delete all documents which are newer than the backup 
after the sync process has finished the first time, to avoid cluttering the 
local database with newer remote documents? How could I be sure the initial 
sync has been completed after the restore has taken place?

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/00f597cd-0c98-4135-ab7b-503afb97d6bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to