How to copy a MagmaCollection from one DB to another one?

Chris Muller chris at funkyobjects.org
Wed Feb 14 05:21:03 UTC 2007


I think this will work.

1) Create your new database with the new collections and the same exact
indexes (with the same specifications recordSize, keySize, etc., this
is important!).

2) find out which collection oids in the old correspond to the ones in
the new.  Record this information on a piece of paper.

3) With both databases shutdown, copy the hdx files for the collections
you want to keep to the new repository directory, renaming them
appropriately to the new oids.  The new (empty) hdx files are replaced
by the renamed old ones.



--- Hilaire Fernandes <hilaire2006 at laposte.net> wrote:

> I did the following:
> 
> oldCollection do: [each: | newCollection add: each veryDeepCopy]
> 
> then I commit newCollection in a dictionary in a different Magma DB.
> 
> I did that, I think I got some message (sorry I forget it as it was a
> couple of days ago, late on the night), but so far the data seem ok.
> 
> When using DB, there are some persisted collections I want to move
> from
> one DB to another, to restart from a fresh empty DB. The orginal
> collections are hand edited with specific tool and cannot be
> recomputed.
> 
> Hilaire
> 
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
> 





More information about the Magma mailing list