Hello,
I am using cblite phonegap plugin in hybrid app that works across iOS and Android.
There is backup feature in the application which allows user to take backup of data from any device/OS on my server and restore it on any other device/OS.
I am facing an issue in the following scenario :
- user takes backup with x number of docs created on Device A
- user now is on device B and performs restore of x docs each of which contain a revision id
- on device B what i do is get all the x docs from my server and issue a PUT request with rev id present in each docs
- this gives me 404 error as the db on device B is blank and hence it wont accept docs with revision id's because it won't be able to find older revisions which is correct.
But the issue is that i need to keep the rev id of docs intact across devices.
Also you might suggest i need to use sync but it as offered as another service which is different then Backup in my app.
Basically what SG does while syncing docs to different devices, i want to do the same manually (i.e put or post docs with a rev id where the doc did not exist before )
Any help ?
If there's any confusion i will be happy to explain more