On 11/10/2010 14:03, Shawn Milochik wrote:
One way would be to use the dumpdata command to export everything, change your
settings to point to the new database, then loaddata to restore.
Okay, so I'm using buildout and djangorecipe for my deployment.
On the postgres-backed server, I did:
bin/django dumpdata > logs.json
This took about 20 minutes and gave me a 132Mb file.
On the mysql-backed server, I did:
bin/django syncdb (and said no to creating a new user)
bin/django loaddata logs.json
This blew up fairly quickly with:
Installing json fixture 'logs' from absolute path.
Problem installing fixture 'logs.json': Traceback (most recent call last):
File "django/django/core/management/commands/loaddata.py", line 150,
in handle
for obj in objects:
File "django/django/core/serializers/json.py", line 41, in Deserializer
for obj in PythonDeserializer(simplejson.load(stream)):
File "django/django/core/serializers/python.py", line 101, in
Deserializer
data[field.name] = field.to_python(field_value)
File "django/django/db/models/fields/__init__.py", line 565, in to_python
_('Enter a valid date/time in YYYY-MM-DD HH:MM[:ss[.uuuuuu]] format.'))
ValidationError: Enter a valid date/time in YYYY-MM-DD
HH:MM[:ss[.uuuuuu]] format.
...which is a little odd, given that the file was created by 'dumpdata'.
Any ideas?
I'm on Django 1.1...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.