Results 1 to 1 of 1
Hi, i found a very nice script to backup one of my mysql-databases:
Code:
#!/bin/sh
DIR="/usr/home/myname/backup"
DATUM=`date '+%d%m%Y-%H%M%S'`
mysqldump -u username -ppassword -h my.server.com --opt databse | gzip -c -9 ...
- 10-02-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 1
various mysql-databases in one .gz
Hi, i found a very nice script to backup one of my mysql-databases:
Itīs nice for me, because itīs rather short and i like the fact, that it dumps the database and zips it in one step.Code:#!/bin/sh DIR="/usr/home/myname/backup" DATUM=`date '+%d%m%Y-%H%M%S'` mysqldump -u username -ppassword -h my.server.com --opt databse | gzip -c -9 > $DIR/backup-$DATUM.sql.gz find $DIR/backup*.sql.gz -name \*.sql.gz -mtime +5 -exec rm {} \;
Can somebody tell me an easy way to make it work for more than one mysql-database, one different servers with different credentials, and wrap it all up in one .gz?
regards
HarP


Reply With Quote