shabda
Comments
Reactions

Django with Mysql and Apache on EC2

By : Shabda Raaj

What is EC2

Unless you have been living on Mars these last few years, you are sure to have heard of EC2. Amazon's cloud offering, it offers infinite scalability. Using EC2, you can bring up any number of machines online at minutes notice, and after you are done with them, bring them down.

How does EC2 work?

A EC2 machine is nothing but a bare machine. An Amazon Machine Image (AMI) is a machine bundled as an Image, with preconfigured software which you can start at moments notice. We will take a AMI with a basic Ubuntu installed, and ...

more info..
Topics : web2.0 Amazon mysql
rama
Comments
Reactions

Automatically backup mysql database to Amazon S3 using django (Python) script

By : rama

Many of us use Amazon S3 to backup  their mysql databases.As we do it so often we thought of writing an automated script which does this task of taking the backup of a mysql database and then moving it to the Amazon S3 .  Below is the django script .

download

   1: def upload_db_to_Amazons3():
   2: """ function which uploadd mysql database to amazon s3"""
   3:  
   4: AWS_ACCESS_KEY_ID = settings.AWS_ACCESS_KEY_ID
   5: AWS_SECRET_ACCESS_KEY = settings.AWS_SECRET_ACCESS_KEY
   6: BUCKET_NAME = settings.BUCKET_NAME
   7: MYSQL_DUMP_PATH = settings.MYSQL_DUMP_PATH
   8: DATABASE_NAME = settings.DATABASE_NAME
   9: ARCHIVE_NAME = settings.ARCHIVE_NAME
  10: .....
  11:  
  12: proc1 = subprocess.Popen(settings.MYSQL_DUMP_PATH+" --no-data  -u root -pwelcome   -x  --databases ...

more info..
Topics : Amazon mysql
© Agiliq, 2009-2012