Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are django fixtures a reliable database backup?

Django n00b here. I was wondering, are django fixtures a reliable way to backup my data, instead of actually backup up the database? What if my database is very large?

Thanks.

like image 497
kevin_82 Avatar asked Oct 11 '22 23:10

kevin_82


1 Answers

Fixtures are intended to house data that should be populated into the database once a new model/entire app is added. This is really for the inevitable move of your code from development to production, where you will need this same data available immediately after syncing the database.

Now, based on this function, you could presumably create a base fixture consisting of essentially a database backup, but that's not really what fixtures are intended for.

Your best bet is to follow the standard practice of keep consistent and frequent SQL backups of your database through the use of cron or some other scheduling app.

like image 77
Chris Pratt Avatar answered Oct 14 '22 00:10

Chris Pratt