[ZODB-Dev] FileStorage backup from snapshot-capable block-device?

Toby Dickenson tdickenson@geminidataloggers.com
Tue, 19 Feb 2002 09:57:49 +0000


On Tue, 19 Feb 2002 14:28:54 +1100, Anthony Baxter
<anthony@ekit-inc.com> wrote:

>
>>>> "Morten W. Petersen" wrote
>> If changes are made to the Data.fs file (i.e. changes are committed)
>> while the Data.fs file is 'slowly' being copied, could the copied
>> Data.fs get corrupted?  (This is on a Linux box).
>
>I cheat with this - I look at the file, md5 the first chunk of it
>to see if it's been packed, if not, just copy off the extra bit at
>the end. Seems to work well enough, and we've been using it for ages.
>Look on zope.org for the 'repozo' script I wrote.=20

That should work safely now that FileStorage only ever writes to the
end of the file. However, I think it would have been dangerous before
the change to 'transactional undo': the old implementation marked
undone transactions to the middle of the file, which your script would
not have copied.

Is there a danger that packing a FileStorage might not change the
content of the first chunk? (I dont know if there is; just thinking
aloud)



Toby Dickenson
tdickenson@geminidataloggers.com