[ZODB-Dev] Copying filestorage file while program is running

Jeremy Hylton jeremy@alum.mit.edu
Wed, 16 Oct 2002 08:22:43 -0400


>>>>> "ML" == Magnus Lycka <magnus@thinkware.se> writes:

  ML> My client just asked me if it's safe for him to backup the
  ML> xxx.fs file when he has saved, or if he must close the program
  ML> first. (The only thing I do on "save" is
  ML> get_transaction().commit().)

  ML> Is it?

Yes.  When a transaction commits, FileStorage flushes the data to
disk.  The data.fs is the only file the you really want to backup
without closing the storage first.  The index will be out of date
otherwise.

The Tools/fstest.py script will run some sanity checks over the
data.fs.  It will complain if it finds anything wrong.  It's a good
thing to do before you run the backup.

Jeremy