by
FMA
- Updated August 3rd, 2007
NB: the content of those config files (crontab, mysqlblasy.conf) might have been modified, so check on the machine.
In terapix:/etc/crontab :
16 1 * * * root /usr/local/bin/mysqlblasy.pl -c /usr/local/etc/mysqlblasy.conf
with $ cat /usr/local/etc/mysqlblasy.conf
dbusername = tpx
dbpassword =
dbhost = localhost
exclude databases = BANDE,DBCADC,DBCATALOG,DBTERAPIX,DBTRANSFERT,GeneriCart,Photometry,elixir,phpgroupware
backupdir = /data1/SAVE/mysql/
mysqldump = /usr/bin/mysqldump
mysql = /usr/bin/mysql
loglevel = 2
use compression = yes
use syslog = yes
tar = /bin/tar
compression tool = /bin/gzip
keep = 60
This mysqlblasy perl script makes a lock on all tables of the mysql server on terapix before doing a copy of them as a tar file in /data1/SAVE/mysql/. Tables listed in exclude databases are not backuped. A special mysql user tpx has been created for this usage. Its only rights are to read the database, and to lock them. 60 backups (i.e. 2 monthes) are kept.