0

I have a Django project which has a lot of apps. To backup the database, I am using django-dbbackup.

To backup the database, I use this: "python manage.py dbbackup" - This command basically does a backup of the existing database and stores it in a specified location. What i want to do is, I want to execute this command periodically, using something like a django-chronograph.

I would like to make an app which would schedule periodic execution of "dbbackup" command from django-dbbackup. How do I make it execute a specific command from another application (which is django-dbbackup). A simple command line command would be fine. Example, I create an app called BS, It should work like this: "python manage.py bs" and then it should automatically execute the command from django-dbbackup and set up a cron job as well. How do I accomplish this? I have made an app called BS using "python manage.py startapp BS", and also added it in INSTALLED_APPS.

thematroids
  • 863
  • 2
  • 9
  • 13
  • These tasks are usually made by Cron jobs http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job – Cartucho Jun 30 '15 at 21:14
  • Why do you want an intermediary app that would run the dbbackup command? You can just use a cronjob to run the `python manage.py dbbackup` without needing an extra app. – Adrian Ghiuta Jun 30 '15 at 21:17
  • @AdrianGhiuta I need an intermediary app because I plan on adding some more functionality related to backups, and I would like to know how to make an intermediary app! Editing dbbackup app is not an option right now. – thematroids Jul 01 '15 at 18:08

0 Answers0