Migrating from Linux to Windows

162 views
Skip to first unread message

stef...@gmail.com

unread,
Sep 1, 2023, 1:06:33 PM9/1/23
to QATrack+
Hi all,

I searched the forum, but could not find an answer.
We setup a test version of QAtrack+ on a linux server, but the real thing has to be on a Windows server.

We seem to have problem to migrate the postgreSQL database to the MS SQL database.

Has anyone ever tried it?   We need help, otherwise we'll have to redo everything.

Stefan

Randle Taylor

unread,
Sep 7, 2023, 12:53:18 PM9/7/23
to stef...@gmail.com, QATrack+
HI Stefan,

You can't migrate a postgres backup to MS SQL directly. However, you can dump your entire database to json using a Django command, then import that json file into your Windows instance.  Your two QATrack+ installations must have the same version.

On your linux server after activating the virtualenv:

    python manage.py dumpdata --exclude=cache --exclude=notifications.Notification > qatrackplus.json

that will give you a json file containing all the objects in your database. 

Asuming your database on your Windows server has been created and migrated then you can copy your json file to your windows server and do the following using Powershell (again you will need to activate your virtualenv and change to the main QATrack+ directory).

python manage.py shell  -c "from qatrack.qa.models import *; Tolerance.objects.all().delete(); User.objects.all().delete(); ContentType.objects.all().delete()"
python manage.py loaddata qatrackplus.json

Hope that helps!

Randy

--
You received this message because you are subscribed to the Google Groups "QATrack+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qatrack+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qatrack/2d4e023f-c026-457e-b4fd-acd6e4d82acan%40googlegroups.com.

stef...@gmail.com

unread,
Sep 7, 2023, 1:13:01 PM9/7/23
to QATrack+
Thanks Randy.

Stef

Reply all
Reply to author
Forward
0 new messages