[Mayan EDMS: 2234] How to migrate from postgres (2.1) to docker sqllite(2.7)?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2234] How to migrate from postgres (2.1) to docker sqllite(2.7)?

LinuxMachine 2016
Hello fellow Mayan users,

I would like to upgrade my mayan instance from 2.1 to 2.7.

I used the advanced deployment method with 2.1. with the postgress database and the python wirtualenv and all that.

However i seem i can not upgrade to the 2.7 version.

There are multiple errors with the advaned deployment i had to fix and my old database with the data is not loaded.

So to make things easier for me in the future i would like to upgrade my 2.1 advanced deployment to the 2.7 docker image.

I got the docker image running on its own but not on with my data.

Biggest Problem for me i right now how to convert the prostgres database to sqllite. I get errors left and right here....

I tried to follow these guides: https://yuji.wordpress.com/2011/05/25/postgresql-sqlite-django-migrating-postgresql-to-sqlite3-with-pg_dump/ and http://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/

But it does not seem to have worked.

Now. my Questions:

1. How do i sucessfully switch over from postgress to sqllite database and migrate the data ?
2. Can i just copy my old settings folder and the document_storage folder in media to the docker data location?

Anything else i should be aware of ?

@Roberto i hope the hurrican aftermach is not so gruseome anymore and you are well.

Thanks for tipps and help :-)

Manuel

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2388] Re: How to migrate from postgres (2.1) to docker sqllite(2.7)?

Michael Price
It is not possible to do a direct copy of data between different database. There are whole markets for the problem of database migration and synchronization.
The best bet would be to dump the database but not using the database tool. Django provides a command that dumps the database in YAML or JSON (I think). The I would be a matter of creating the new empty database and reloading the dumped data.

https://coderwall.com/p/mvsoyg/django-dumpdata-and-loaddata

On Friday, December 29, 2017 at 2:44:43 PM UTC-4, LinuxMachine 2016 wrote:
Hello fellow Mayan users,

I would like to upgrade my mayan instance from 2.1 to 2.7.

I used the advanced deployment method with 2.1. with the postgress database and the python wirtualenv and all that.

However i seem i can not upgrade to the 2.7 version.

There are multiple errors with the advaned deployment i had to fix and my old database with the data is not loaded.

So to make things easier for me in the future i would like to upgrade my 2.1 advanced deployment to the 2.7 docker image.

I got the docker image running on its own but not on with my data.

Biggest Problem for me i right now how to convert the prostgres database to sqllite. I get errors left and right here....

I tried to follow these guides: <a href="https://yuji.wordpress.com/2011/05/25/postgresql-sqlite-django-migrating-postgresql-to-sqlite3-with-pg_dump/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyuji.wordpress.com%2F2011%2F05%2F25%2Fpostgresql-sqlite-django-migrating-postgresql-to-sqlite3-with-pg_dump%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHat_7jadmdJsCyVXBihOxgUJzZAQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyuji.wordpress.com%2F2011%2F05%2F25%2Fpostgresql-sqlite-django-migrating-postgresql-to-sqlite3-with-pg_dump%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHat_7jadmdJsCyVXBihOxgUJzZAQ&#39;;return true;">https://yuji.wordpress.com/2011/05/25/postgresql-sqlite-django-migrating-postgresql-to-sqlite3-with-pg_dump/ and <a href="http://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fmanuelvanrijn.nl%2Fblog%2F2012%2F01%2F18%2Fconvert-postgresql-to-sqlite%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGreGtI46XtuIWAEFlqXIVRvvu6ww&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fmanuelvanrijn.nl%2Fblog%2F2012%2F01%2F18%2Fconvert-postgresql-to-sqlite%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGreGtI46XtuIWAEFlqXIVRvvu6ww&#39;;return true;">http://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/

But it does not seem to have worked.

Now. my Questions:

1. How do i sucessfully switch over from postgress to sqllite database and migrate the data ?
2. Can i just copy my old settings folder and the document_storage folder in media to the docker data location?

Anything else i should be aware of ?

@Roberto i hope the hurrican aftermach is not so gruseome anymore and you are well.

Thanks for tipps and help :-)

Manuel

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.