Your rsync command might be ignoring any journal files that may be
outstanding.

John

On Fri, Mar 6, 2009 at 10:33 AM, Derrell Lipman <derrell.lip...@gmail.com>wrote:

> On Thu, Mar 5, 2009 at 7:39 AM, Peter van Dijk <pe...@openpanel.com>
> wrote:
>
> > On Thu, Mar 05, 2009 at 04:30:50AM -0800, donnied wrote:
> > >
> > > rsync was corrupting the database.  I'll have to exclude the database
> > from
> > > rsync backup.
> >
> > I feel a need to point out that it is not, technically, rsync that was
> > corrupting
> > the database. The issue is that rsync does not take -snapshots- of files;
> > for
> > that matter, very few backup tools do. One fix/workaround is to have a
> > cronjob
> > for making textual dumps.
> >
>
> If it's possible that some other application is modifying the database
> while
> you're backing it up, you'll likely end up with a corrupted database when
> you rsync it. rsync only copies changed regions of files to save bandwidth.
> If you make it a standard practice to always issue a "BEGIN EXCLUSIVE"
> transaction on the database before you do your rsync, then the database
> will
> be in a consistent state on both the destination side where rsync compares
> and the source side where rsync is looking for changes. This way, the
> database is effectively a static (unchanging) file and rsync should have no
> problem backing it up without corruption. After you complete the rsync then
> ROLLBACK the transaction.
>
> Derrell
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to