*shit* can't edit my previous post :( Forgot to add the console output when restoring the database (there are a few extra lines from other methods present in there). Maybe these warnings have something in common with the broken initial sync after restoring?
hasPullReplication: false hasPushReplication: false pendingDocumentIDCount: 0 - idleReplicationCount: 0 pendingDocumentIDCount: 0 - idleReplicationCount: 0 2015-11-22 11:39:53.468 biz[5379:11135826] _BSMachError: (os/kern) invalid capability (20) 2015-11-22 11:39:53.468 biz[5379:11135826] _BSMachError: (os/kern) invalid name (15) pendingDocumentIDCount: 0 - idleReplicationCount: 1 pendingDocumentIDCount: 0 - idleReplicationCount: 2 initialReplicationCompleted: Optional((Function)) 2015-11-22 11:39:53.710 biz[5379:11135826] Running database update... 11:39:53.903‖ WARNING: CBL_Pusher[https://sync.mandelkind.biz:4984/biz]: Couldn't get local contents of {-hZTLhYojFIQjEkOxMFgRJB #1-cefce94614ae803e05594b95a7f60f47} 2015-11-22 11:39:53.922 biz[5379:11135826] Database finished. pendingDocumentIDCount: 0 - idleReplicationCount: 1 11:39:54.396‖ WARNING: CBL_Pusher[https://sync.mandelkind.biz:4984/biz]: Couldn't get local contents of {-_8gOVW9U7S-LxzfIBgOkbz #1-f30d143725f00a5cca94b61ed5902576} pendingDocumentIDCount: 0 - idleReplicationCount: 2 Am Samstag, 14. November 2015 19:30:17 UTC+1 schrieb [email protected]: > > *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/951ab8b4-4d3d-41d2-b5dd-2ecc53a56ec6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
