How to make db dumpfile in django
===

I want to make a dump in django irrespective of database I am using and can be loaded later. The command 'dumpdata' is perfect for this, but it is printing output on console. More over I am calling it using call_command function so I cannot store its content in any variable as it is printing output on console. 

Please let me know how store dump to a file using dumpdata or any other command or api.

Thanks