[ZODB-Dev] Migrating from filestorage to relstorage with blobs

Shane Hathaway shane at hathawaymix.org
Tue Jan 11 00:32:11 EST 2011


On 01/10/2011 03:58 PM, Maurits van Rees wrote:
> Starting with RelStorage 1.5.0a1 (or trunk) there is support for blobs
> in RelStorage.  You have the option to either store the blobs on the
> file system (var/blobstorage) or store them in the relational database.

To clarify, blob support was in version 1.4, but the newest release 
gives you the option of where to put them.

> With filestorage combined with blobstorage it seems you only have one
> option: you get a small Data.fs and a big var/blobstorage directory that
> contains the files.
>
> Question: can the blobs also be stored in the Data.fs (supposing you
> want that)?

Not that I know of.

> plone.app.blob has migration code to move existing Archetypes files and
> images to blobstorage: @@blob-file-migration and @@blob-image-migration.
>
> I successfully migrated a 100 MB filestorage without blobstorage to a
> setup of relstorage with blobstorage.  Both possible routes (first to
> relstorage using zodbconvert, then to blobstorage or the other way
> around) worked.
>
> Question: if I start with filestorage plus a var/blobstorage directory,
> is it possible to migrate this to relstorage with blobs stored in the
> relational database?

It should work, yes.  You have to use different blob directories for the 
source and destination.

> Posed more general: is there migration code that migrates blobs from a
> (relational) database to a var/blobstorage directory or the other way
> around?

Yes, if you mean you want to copy the pickles as well, then zodbconvert 
should handle it.  If you don't want to copy the pickles, I'm not sure.

> I can at least say that in my light testing so far, RelStorage 1.5.0a1
> with blobs works fine, so thanks Shane!

Thanks for testing.  1.5.0a1 seems to be quite stable, so unless any 
issue surfaces, it's going to turn into a final release really fast.

Shane


More information about the ZODB-Dev mailing list