[Tracker] Announcing backup&restore support in urho-sync



The branch urho-sync now supports backup and restore.

The restore doesn't yet immediately play the journal file, but I will
add that in a few minutes (first lunch). Please test this thoroughly.

Note that urho-sync also utilizes the journal idea that we have
discussed recently. This idea allows us to turn off synchronous
transactions in sqlite.

Although this sounds dangerous for data consistency and corruption, that
danger is of course precisely what the journal is about.

The urho-sync branch makes periodic backups using the sqlite3_backup API
and then truncates a journal. While a backup has not been made yet will
each update query be journalled in a flat file that gets fsync()ed each
time.

Backup now means that we make a copy of the journal and the periodical
backup of the meta.db file (and first make one if there was not one
yet).

Restore now means that we replace meta.db and your live journal with the
file that you provide to the restore call.

Restore is of course a bit more complicated because we have to blow the
fuse of the database before restore, and restore the fuse after restore.

-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]