0

I would like to know how I can copy data from my production server (django+postresql) to my local dev servers (win7+sqlite3 + ubuntu+sqlite3).

My data is dumped in json format.

2 Answers 2

1

Use manage.py's loaddata predicate to load the dumped data.

Sign up to request clarification or add additional context in comments.

1 Comment

That would be a problem with your data.
1

After first syncdb Django inserts some initial data to some tables (for eg. content_types, superuser). Remove your sqlite3 database, and run ./manage.py syncdb --noinput. If there's any data in tables, truncate them before running loaddata.

2 Comments

Thanks for the tip but I am still getting the same error. 1. deleted the db 2. manage.py syncdb --noinput 3. django-admin.py loaddata datadump.json --settings=settings
Have you truncated django_* tables?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.