Re: Migrate data between computers
On 5/31/07, Michal <[EMAIL PROTECTED]> wrote: > > I trust to my data, so I temporary disabled save() overriding. Now > loaddata was successfull, and my application on computer2 works like charm. Good to hear. I've opened ticket #4459 to address the problem; I've got some ideas on how to fix the issue, but I need to have a closer look. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Migrate data between computers
> to migrate i do this: > 1. all code is anyway on svn, so i do a checkout in the new machine > 2. i do a pg_dump on the old machine, and after setting up the > database run: > psql -f dumpfile newdatabase Unfortunately, I have different versions of PostgreSQL database on my local enviroment and server. Therefore, output of pg_dump I must manually edit and this take me longer time, than dumpdata & syncdb & sqlflush & loaddata. > 3. manaully copy and edit settings.py (this is not under svn) > 4. use scp -r to copy the media stuff Hm, -r parameter? New to me, thank you for hint! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Migrate data between computers
> Are you overriding save() in any of your models (in particular, > anything querying StaticPage model? Yes, I am. I have there some check code, which prevent to save object, which will refer to itself. > The only workaround I know of for this is to do your dump in stages, > so that the data required by the query in the save() method is > available at the time the saved object. However, this approach isn't > always possible (depending on the circular relationships in your > data). I trust to my data, so I temporary disabled save() overriding. Now loaddata was successfull, and my application on computer2 works like charm. Thank you very much for advise. Regards Michal --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Migrate data between computers
On 31-May-07, at 1:39 PM, Michal wrote: > I would like migrate data from my Django project on notebook > (computer1) > to another machine (computer2). To perform this, I follow this steps: to migrate i do this: 1. all code is anyway on svn, so i do a checkout in the new machine 2. i do a pg_dump on the old machine, and after setting up the database run: psql -f dumpfile newdatabase 3. manaully copy and edit settings.py (this is not under svn) 4. use scp -r to copy the media stuff -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Migrate data between computers
On 5/31/07, Michal <[EMAIL PROTECTED]> wrote: > > Hello, > I would like migrate data from my Django project on notebook (computer1) > to another machine (computer2). To perform this, I follow this steps: > ... > Is this approach correct? Looks correct to me. > I ask you for this, because I have problem to load data on computer2. My > effort ends with error message: > >[EMAIL PROTECTED] app $./manage.py loaddata all.json >Loading 'all' fixtures... >Installing json fixture 'all' from absolute path. >Problem installing fixture 'all.json': StaticPage matching query does > not exist. I have seen this error before. That time, it wasn't (technically) due to a fault in the serializer - it was caused by a model overriding the save() method. In the overridden save() method, there a query was performed on the database, but the required objects had not yet been loaded. Are you overriding save() in any of your models (in particular, anything querying StaticPage model? The only workaround I know of for this is to do your dump in stages, so that the data required by the query in the save() method is available at the time the saved object. However, this approach isn't always possible (depending on the circular relationships in your data). Yours, Russ Magee %-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Migrate data between computers
Hello, I would like migrate data from my Django project on notebook (computer1) to another machine (computer2). To perform this, I follow this steps: 1) On computer1 I call ./manage.py dumpdata > all.json 2) On computer2 I setup exactly same version of my Django project. Next I call ./manage.py syncdb which create all necessary DB tables and (unfortunately for me) all fixtures+initial data (like auth_permission, django_site, admin user, etc). 3) Because all.json file contains all data from computer1, I call ./manage.py sqlflush on computer2. This give me SQL statements, which I used to "clear" all data from fresh database on computer2. 4) Now I could call ./manage.py loaddata ./all.json Is this approach correct? I ask you for this, because I have problem to load data on computer2. My effort ends with error message: [EMAIL PROTECTED] app $./manage.py loaddata all.json Loading 'all' fixtures... Installing json fixture 'all' from absolute path. Problem installing fixture 'all.json': StaticPage matching query does not exist. I don't know what I should do now. Even, if I set --verbosity 2 to ./manage.py I don't get any usefull information what is wrong. Is it possible to found somehow where is the problem? Note: I used unicode branch [5387] on both computers, but I supposse, that this is some general problem Regards Michal --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---