[ZODB-Dev] Backing up Data.fs and blob directory

Christian Theune ct at gocept.com
Thu Sep 4 01:51:29 EDT 2008


Hi Laurence,

On Wed, 2008-09-03 at 08:06 -0700, Laurence Rowe wrote:
> Backing up a ZODB has always been fairly easy in the past, but with the
> introduction of blobs things have got a little more complex.
> 
> How should I create a consistent backup of my Data.fs and blob directory?
> 
> My inital guess would be to take a copy of the Data.fs, then take a copy of
> the blob directory to ensure I have all blobs referenced in the Data.fs.
> Would I be able to restore from such a backup safely? (it may contain blobs
> from transactions that were newer than the backed up Data.fs).
> 
> This should be safe because committed blobs are immutable and any dangling
> blobfiles would not interfere with the creation of blobs from new
> transactions in the restored zodb, as transaction ids would not overlap.
> 
> I would be greatful if anyone could point out holes in my reasoning or has
> experience of this.

Snapshotting a blob directory after taking a copy of your Data.fs should
be safe, as long as you don't pack in between.

Note that at the design stage we imagined that blob directories might
become really large making backups unfeasable. For those situations we
handwaved a "very reliable storage" for this directory, like a
self-contained SAN/NAS solution that keeps your data safe.

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20080904/7272815c/attachment.bin 


More information about the ZODB-Dev mailing list