Open Xyroid opened 12 years ago
maybe this can help a bit: http://www.sqlite.org/backup.html
On Tue, Oct 2, 2012 at 9:40 AM, Xyroid notifications@github.com wrote:
Hi, I am developing a note taking app. User will write note and he can set some metadata like location, note date time, etc. I am using SQLite for metadata and note will be RTF file. Now I want to have skydrive sync for that app. So user can access/backup/restore notes and its metadata from any Windows 8 device. I can upload and download files easily, but what approach should I use to sync the SQLite database ? Please guide me with some sample code.
— Reply to this email directly or view it on GitHubhttps://github.com/praeclarum/sqlite-net/issues/113.
Interesting, but what is the equivalent c# syntax to do such incremental online backup of the DB using SQlite.NET? I'm also trying to find a way to backup my iPhone app DB to iCloud incrementally (writing to iCloud only the differences).
That link states all your options, the first of which mean the easiest, which is just coping the database.
From the top of the page from the link provided above:
- Establish a shared lock on the database file using the SQLite API (i.e. the shell tool).
- Copy the database file using an external tool (for example the unix 'cp' utility or the DOS 'copy' command).
- Relinquish the shared lock on the database file obtained in step 1.
This is how I back it up, just make sure you don't have any open connections to the database and then copy it to wherever you want. You can google quickly how to copy files in C# and in MonoTouch as they are basically the same for this functionality.
SQLite is a single portable file, which is why its very popular.
Hi, I am developing a note taking app. User will write note and he can set some metadata like location, note date time, etc. I am using SQLite for metadata and note will be RTF file. Now I want to have skydrive sync for that app. So user can access/backup/restore notes and its metadata from any Windows 8 device. I can upload and download files easily, but what approach should I use to sync the SQLite database ? Please guide me with some sample code.