1👍
✅
Python comes with sqlite3 included, but if you only want to dump the data then:
django-admin dumpdata
or
python manage.py dumpdata
will do it for you. For more details read: https://docs.djangoproject.com/en/1.9/ref/django-admin/#dumpdata where it says:
–output OUTPUT, -o OUTPUT
New in Django 1.8.
Specifies a file to write the serialized data to. By default, the data
goes to standard output.
which means that if you’re using a Django version >= 1.8 you could use:
python manage.py dumpdata --output my-database-dump.json
and if you’re on an earlier version of Django you would need to use:
python manage.py dumpdata > my-database-dump.json
Source:stackexchange.com