Here is a script I wrote that can backup a mysql database via innobackupex and upload it to a specified swift container.
It assumes there is a pw file and that the swift container already exists...might be useful for this
Creating encrypted backup up MySQL database via innobackupex...
Backup name: db_backup_stage-20130423-21-27-05.tar.gz.des3
Command: innobackupex --stream=tar /var/lib/mysql/ | gzip - | openssl des3 -salt -kfile pw_file.dat > db_backup_stage-20130423-21-27-05.tar.gz.des3
Status: 0
Output:
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
innobackupex: Backup created in directory '/var/lib/mysql'
innobackupex: MySQL binlog position: filename '', position
innobackupex: You must use -i (--ignore-zeros) option for extraction of the tar stream.
130423 21:27:29 innobackupex: completed OK!
Swift store result:
201
--------------------------------------------------------------------------------
Listing all objects in store...
db_backup_stage-20130423-21-27-05.tar.gz.des3
Here is a script I wrote that can backup a mysql database via innobackupex and upload it to a specified swift container.
It assumes there is a pw file and that the swift container already exists...might be useful for this
python backup_ and_store_ directory. py --os_username=USER --os_password= PASSWORD --os_tenant_ name=USER- tenant1 --swift_ store_name= 'mahtester' --backup_ name='db_ backup_ stage' --pass_ file=pw_ file.dat --db_backup_ path=/var/ lib/mysql/ --os_auth_url=https:/ /region- a.geo-1. identity. hpcloudsvc. com:35357/ v2.0/tokens
Creating encrypted backup up MySQL database via innobackupex... stage-20130423- 21-27-05. tar.gz. des3 stage-20130423- 21-27-05. tar.gz. des3
Backup name: db_backup_
Command: innobackupex --stream=tar /var/lib/mysql/ | gzip - | openssl des3 -salt -kfile pw_file.dat > db_backup_
Status: 0
Output:
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.
innobackupex: Backup created in directory '/var/lib/mysql'
innobackupex: MySQL binlog position: filename '', position
innobackupex: You must use -i (--ignore-zeros) option for extraction of the tar stream.
130423 21:27:29 innobackupex: completed OK!
Swift store result:
201 ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --- stage-20130423- 21-27-05. tar.gz. des3
-------
Listing all objects in store...
db_backup_
Removing backup file: db_backup_ stage-20130423- 21-27-05. tar.gz. des3