Reputation: 11523
How can I get the data on Heroku and create a fixture I can load locally? heroku run python manage.py dumpdata --natural > data.json
is the command, but how can I download the file?
Upvotes: 9
Views: 2870
Reputation: 29967
Try adding to dashes to indicate the end of the command:
heroku run python manage.py dumpdata --natural-foreign -- > data.json
This should redirect the output to a local file.
Upvotes: 29
Reputation: 139
Try heroku pg:backups capture
$ curl -o latest.dump
- heroku pg:backups public-url
Upvotes: 0