Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have the command :

./manage.py dbbackup --clean --compress

provided by the django-dbbackup app which performs a backup of my PostgreSQL database to Amazon S3. I am trying to run this command inside a django celery task run daily.

When I run:

from django.core.management import call_command
call_command('dbbackup --clean --compress', interactive=False)

I am getting an exception because of the clean and compress arguments.

Any ideas on how I can run this command?

share|improve this question

1 Answer 1

I magically found that running:

call_command('dbbackup', clean=True, compress=True, interactive=False)

works perfectly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.