[Opa] MongoDB migration
Quentin Bourgerie
quentin.bourgerie at mlstate.com
Fri Mar 9 16:06:55 UTC 2012
Hello Clement, Owen and the list.
With Opa 0.9.1 you can declares many database with several backends.
For instance the following code declares two database the first one
named db3 with the db3 backend, second one named mongo with the MongoDB
backend :
/* db3 schema */
database db3 @db3 {
int /i
string /s
float /f
intmap(string) /im
}
/* mongo schema */
database mongo @mongo {
int /i
string /s
float /f
intmap(string) /im
}
But with the current stable version you can't overwrite whole set and
maps (mongo).
Thus you should fold on db3 maps to populate the mongo maps.
However with the coming nightly (build >= 1474),
we remove restriction on mongo set and maps.
So, with this coming nightly you can really easily write an Opa apps
which migrates data from db3 to mongo.
As the following code do
/* Read /db3 and overwrite /mongo */
/mongo <- /db3
Best Quentin.
On 03/01/2012 12:29 PM, Quentin Bourgerie wrote:
> I'll release soon a way to have several databases backends in the same
> Opa app.
> The migration will be enough easy to write.
> I'll tell you more once I would have released.
>
> Quentin
> On 01/03/2012 03:04, Owen Gunden wrote:
>> On Thu, Feb 23, 2012 at 11:01 AM, Clement Le Marc
>> <clement at revolutionmobile.fr> wrote:
>>> Is it possible to connect simultaneously to the old native database and
>>> Mongo ? I know you can open 2 native databases at the same time but
>>> does it
>>> work the same ? any experience for that kind of stuff ?
>> I don't know if you can connect to them both at the same time, but I
>> just
>> did a migration from an SQL webapp to Opa by dumping the old one as
>> a giant xml document and reading it into the new one. It's not fast, but
>> it works, and you can use two separate apps for it.
>> _______________________________________________
>> Opa mailing list
>> Opa at lists.owasp.org
>> https://lists.owasp.org/mailman/listinfo/opa
>
> _______________________________________________
> Opa mailing list
> Opa at lists.owasp.org
> https://lists.owasp.org/mailman/listinfo/opa
More information about the Opa
mailing list