Django on Heroku dumpdata incomplete exit

I am trying to dump a relatively small amount of data (80 lines or so django-cms text plugin 1 ) remotely using Herobu toolbelt tool:

 heroku run python manage.py dumpdata text 

But I get random incomplete output that approaches EOF every time it starts (supposedly cached?).

 11:09 PM $> heroku run python manage.py dumpdata text | wc -c 108351 11:09 PM $> !! 120629 11:09 PM $> !! 122693 11:10 PM $> !! 122949 11:10 PM $> !! 153419 11:13 PM $> !! 120877 

Does anyone come across something similar? I am using Django 1.4 with postgresql.

1 although these are blobs HTML o_0: see the docs .

Edit: Suppose this is just a limitation? pg_dump / restore was my backup plan.

+7
source share
3 answers

It seems like for some reason the script timeout. This is either a mistake or a “function” on the part of Heroku. Here is a workaround:

https://devcenter.heroku.com/articles/heroku-postgres-import-export

+2
source

Another workaround is to add a sleep command to stop the session timeout.

heroku run "python manage.py dumpdata; sleep 10"

Presumably the number is growing along with your database ...

+5
source

Another simpler workaround is to start dumpdates from the heroku bash prompt:

 heroku run bash python manage.py dumpdata ... 

Then record the output from your terminal. Copy and paste worked for me. I am sure there is a more convenient way to do this.

+2
source

All Articles