[Qgis-community-team] Example backup script for joomla

Tim Sutton tim at linfiniti.com
Fri Jun 6 10:41:59 EDT 2008


Hi Otto (and anyone else interested)

Here is the backup script I wrote on the qgis.org server to send
myself a nightly backup of the mysql database:

QGIS_MYSQL=/backups/joomla_qgis_backup.`date +%d%m%Y`.sql
mysqldump -uroot -S /chroot_postgis/var/run/mysqld/mysqld.sock -e -c
-Q --allow-keywords --add-drop-table -pbar joomla_qgis > ${QGIS_MYSQL}
gzip -f ${QGIS_MYSQL}
FILENAME=${QGIS_MYSQL}.gz
mpack -s "Daily QGIS.org Mysql backup for `date +%d-%m-%Y`" $FILENAME
tim at linfiniti.com

Note :
- you can use a comma delimited list for the recipients on the last line.
- you need 'mpack' installed to ba able to package the backup into an
email attachment from the command line
- I was using mysql on unix socket rather than on tcp/ip port so you
will need to adjust / remove the mysqldump -S parameter
- make sure the other mysql dump parameters are included otherwise
joomla backup will not restore cleanly since in some cases they used
sql reserved words for field names etc.
- replace -pbar with -p<yourpassword>

Regards

Tim

-- 
Tim Sutton
QGIS Project Steering Committee Member - Release Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net


More information about the Qgis-community-team mailing list