В сообщении от Friday 25 July 2008 03:40:22 Roger Binns написал(а):
> Alexey Pechnikov wrote:
> > Is any way to repair corrupted database?
>
> From a theoretical point of view the only way to repair a corrupted
> database is if there are multiple redundant copies of data or of
> generating that data.  Since SQLite doesn't do that (exception: indices
> can be regenerated from uncorrupted data) you are mainly out of luck.
> Instead SQLite takes the approach of trying to prevent corruption in the
> first place.
>
> You can address this problem yourself.  Write your own custom VFS layer
> where you can store multiple redundant copies, checksums or whatever
> else you are trying to defend against.

May be on FS layer? Which FS can help me for this? I'm using ext3 FS now on my 
debian box. May be rsync or like software can restore corruption blocks from 
full or incremental backups? 

> It is also worth noting that unless you are running on mainframes or
> "server" hardware, other corruption will be ignored.  

Yes, I'm using SQLite on servers. On winmobile PDA/smartphones I have no 
problems with SQLite and if database corrupted on this environment than 
winmobile must be reinstalled and FS reformatted. But on server I must make 
provision for data restoring in any cause.

> For example 
> commodity machines don't have error checking or correcting RAM, checking
> CPUs, checking hard disk controllers.  The good news is that it is
> slowly coming such as end to end checksums in ZFS, checksums in the SATA
> spec etc.

Database servers such as Oracle or PostgreSQL have transactions log and 
restore log. How can I provide restore mechanisms for SQLite database? May be 
any fuse VFS module can do incremental delta of changes? May be I can do 
incremental copy of SQLIte database after every writing transaction "on the 
fly" (without database blocking) by rsync/... ?

P.S. Database servers not good for me because I need for free, fast and 
reliable embedded database in my multi-thread application server. 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to