[elephant-devel] Live backup

Ian Eslick eslick at csail.mit.edu
Sat Dec 8 13:38:18 UTC 2007


There really isn't a good solution to this that I'm aware of other  
than a stop and copy.  The easiest would be to halt all transactions,  
do a file system copy, then continue.  That might only take a handful  
of seconds depending on the size of your DB and speed of your system.

There are more complex ways to do this that are driven by your  
application model that are similar to traditional GC.  Implement a  
copy-on-write policy in your transactions and a create-new-in-new  
policy for object creation and just copy all the objects from one  
store to another.  The old store is now your snapshot, and the new  
store has all your live data.  This would, however, break all the nice  
indexing stuff we have (get-instances-by-value) since the class  
(metaclass instance) would be pointing at the old store.

We haven't really thought through or provided support for this second  
case, but we're open to suggestions on how this could/should be done!

Ian

On Dec 8, 2007, at 6:24 AM, Leslie P. Polzer wrote:

>
> How would I go about doing a live backup of an Elephant-persistent
> set of objects? I suppose just copying the Berkeley DB would result
> in inconsistencies...
>
>  Leslie
>
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list