#!/bin/bash
#backup bases de donnée mysql
chemin="[path]/backups"
file="$chemin/$(date +'%Y%m%d')dbName.sql"
touch $file

mysqldump -u[usr] -p[passwd] dbName > $file
gzip $file
cd $chemin
#erase file older than 50 days
find . -mtime +50 -exec rm {} \;
 
info/mysqlsimplebackup.sh.txt · Dernière modification: 2008/11/11 11:37 (modification externe)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki