My goal here is to create a backup and recovery scheme, where recovery is possible on any computer.
I've been performing incremental updates to an application that people have started to use. The incremental updates seem to have created a problem for the dump and load data functions when trying to reload into a fresh database. I tried to use dump data to create an __ initial __ .json file, but I received a duplication error on load, I think from the unique index (not the primary key) on the content type. I believe this is because the tables (and thus content types) are created in a different order when doing a syncdb from scratch, as opposed to incrementally on the old production machine. One possible solution is to create a DB without any of the application data, only with the Django meta data. Then I could just dump and load my application data afterward. The only issue with that is that I would really like to be able to save the admin log. My brute force solution to this looks like it will end up being to drop all the FKs pointing at content type, update the IDs in the content type table and all referencing tables to match a fresh syncdb, then recreate the FKs. This is definitely not the most elegant solution. I thought that dump data would work for a backup mechanism but it seems to break with application modifications (table additions) too easily. I see a real and an other potential problem here. Real: The manual operation to create content types in the correct order belies an automated process to do so. Potential: Even after the operation is done, the records seem to be dumped in random order in the json file. I'm not sure that after my operation they will be dumped in the same order. If they aren't then I believe I'm back to the same problem. >From where I stand it looks like the MySQL backup is going to be the way to go for me. Firstly, does anyone have a more elegant solution to the dump and load data problem specifically? Second, what do you use for a data backup and recovery scheme for your Django data? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---