QATrack+ backup

199 views
Skip to first unread message

Sašo Pulko

unread,
Mar 18, 2017, 7:14:39 AM3/18/17
to QATrack+

Hi Randy and all!


I am trying to setup our QA routine with QATrack+. I had already created most of the tests for CT simulator and Linac. Now I would like to test some other features and also integrate some external python programs into QATrack+. But before I do that, I would like to create a backup of QATrack+ just in case something goes wrong :) . What would be the optimal way of doing that? 


I would also like to know how users, who use QATrack+ in “clinical practice”, do backup? What routine do you use? Which one would you recommend me?


Best,

Sašo

Akos Gulyban

unread,
Mar 18, 2017, 7:10:06 PM3/18/17
to QATrack+
Hi Saso,

We are doing these as backup:

$ python manage.py dumpdata --natural --indent=4 -e contenttypes -e auth.Permission > FILENAME.json

Then the “FILENAME.json” needs to be backed up.

The folder “/web/qatrackplus/qatrack/media/uploads” can be regularly synchronized with a backup destination (in an incremental way, that only the changed files needs to be overwritten…)


Please note that the json DB dump is only taking the data but if you are using any file upload based test, the original files are not included in that backup.

Best regards

Akos

Sašo Pulko

unread,
Mar 24, 2017, 2:11:37 AM3/24/17
to QATrack+
Thank you Akos for info, I will try your way.
What about other? Randy what is your recommended way?

Best,
Sašo

Dne nedelja, 19. marec 2017 00.10.06 UTC+1 je oseba Akos Gulyban napisala:

Randle Taylor

unread,
Mar 24, 2017, 9:58:56 AM3/24/17
to Sašo Pulko, QATrack+
Hi Sašo,

Sorry for the slow response.  The method you use for backups depends on what database you are using.  

As Akos said, you can dump the entire database to JSON which can serve as a backup.  This is a database agnostic way to do it and will work ok.

I normally use the datatbase tools to dump to an SQL file these days.  The method you use depends on which database you are using of course.

For SQLServer, you can create a maintenance plan to backup your database every night: https://msdn.microsoft.com/en-us/library/ms189715.aspx

With PostgreSQL on Linux I generally would create a cron job that dumps the database using pg_dump: https://www.postgresql.org/docs/9.5/static/backup-dump.html  .  Here's an example script that you could set to run every night that will backup all your databases and delete the backups after a certain number of days: https://gist.github.com/cihann/cc9d7c0c837cf29c78d4 (that will back up all databases).

In general I recommend setting it up so that your database is backed up every night and backups are retained for at least 30 days.  Some hospitals may have IT policies in place to specify how frequently data should be backed up and retained.

I also strongly recommend storing backups on a separate server so if something ever happens to your server your backups will be safe.

Another thing to consider is if you use the file upload feature of QATrack+ then you may want to backup the /media/uploads directory as well.

Hope that helps a bit!

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+unsubscribe@googlegroups.com.
To post to this group, send email to qat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sašo Pulko

unread,
Mar 26, 2017, 1:48:12 PM3/26/17
to QATrack+
Thank you Randy! Yes it helps a lot. :)

Dne sobota, 18. marec 2017 12.14.39 UTC+1 je oseba Sašo Pulko napisala:
Reply all
Reply to author
Forward
0 new messages