Skip to content

Script is a fork of django's dumpdata, but dumps data in chunks to avoid MemoryError

Notifications You must be signed in to change notification settings

fastinetserver/django-dumpdata-chunks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

django-dumpdata-chunks

Script is a fork of django's dumpdata, but dumps data in chunks to avoid MemoryError

Django-dumpdata-chunks is BSD licensed ( http://www.linfo.org/bsdlicense.html ).

Please let me know if you have any questions.

Example usage:

  1. Dump data into many files:

mkdir some-folder

./manage.py dumpdata_chunks your-app-name --output-folder=./some-folder --max-records-per-chunk=100000

  1. Load data from the folder:

find ./some-folder | egrep -o "([0-9]+_[0-9]+)" | xargs ./manage.py loaddata

NOTE: you can also generate a script to load data:

find ./some-folder | egrep -o "([0-9]+_[0-9]+)" |sort | awk '{print "./manage.py loaddata "$1}' > script-to-loaddata.sh

GENERAL LINKS:

Django: http://djangoproject.com/

Django Code of Conduct: https://www.djangoproject.com/conduct/

BSD licensed: http://www.linfo.org/bsdlicense.html

About

Script is a fork of django's dumpdata, but dumps data in chunks to avoid MemoryError

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages