Backup your django database using fabric

Reactions: 0 pingback - 3 comments - 3 votes

The use of a simple python script called fabfile.py, in order to manage yours django applications reveals how straightforward and simple is the deploy phase by using fabric tool.

I use fabric about everyday, to manage various repetitive and tedious tasks regarding the maintenance of this blog. Currently I have a local git repository where all the source code of the blog is stored and a fabfile.py that helps me to deploy it correctly and in automatized way to my VPS server.

In this post I want to show you how simple is to create a simple command to backup your SQL database. In this example I'm using mysqldump command to dump the database contents to a compressed gzip file. Obviously you could edit the following script to include pg_dump if you're using postgresql database or whatever.

Copyright © 2010 nopper.archpwn.org

This is the official my personal blog and official one of the ArchPwn project.

ArchPwn is released under the terms of GPL license. All rights reserved.

CSS/HTML valid.