What is the best way to back up a django project?

I support a couple of low-traffic sites that have reasonable user-loaded multimedia files and semi-set databases. My goal is to backup all data that is not versioned in a central location.

My current approach

I am currently using a nightly cronjob, which uses dumpdatato dump the entire contents of the database into JSON files in a project subdirectory. Media loading is already in the project directory (c media).

After resetting the database, the files are copied using rdiff-backup(makes an incremental backup) to another location. Then I load the rdiff-backup directory on a regular basis with the help of rsyncstoring a local copy.


Your ideas

What do you use to back up data? Submit your backup solution - if you have only a few hits per day on your site or if you maintain high traffic with shared databases and several file servers :)

Thanks for your input.

+5
source share
2 answers

My backup solution works as follows:

  • Upload data to a separate directory every night. I prefer the data dump directory to be different from the project directory (one of the reasons is that the project directory changes each time the code is deployed).

  • Run the task to upload data to my Amazon S3 account and to another location using rsync.

  • Send me an email with the magazine.

, script S3 .

+3

Django-Backup . cronjob.

,

+2

All Articles