You can specify the format using -format optionĬommand supports for following formats(serialization formats) Example output of above command is belowīy default, dumpdata will format its output in JSON.manage.py dumpdata er -indent 2 > user.json You can use the -indent option to pretty-print the output with a number of indentation spaces manage.py dumpdata -exclude auth.permission > db.json dumpdata (-indent)īy default, dumpdata will output all data on a single line. You can use -exclude option to specify apps/tables which don't need being dumpedįollowing command will dump the whole database with out including auth.permission table content manage.py dumpdata er > user.json dumpdata (-exclude) Following command will dump the content in django er table.manage.py dumpdata admin.logentry > logentry.json Following command will dump only the content in django admin.logentry table.manage.py dumpdata admin > admin.json dumpdata for backup specific table Following command will dump the content in django admin app into admin.json file. manage.py dumpdata > db.json dumpdata for backup specific app
0 Comments
Leave a Reply. |