Quick and Dirty Mysql backup to Samba share
#mount the samba sharemount -t smbfs -o username=<username>,password=<password> //server/share /mnt/database
#backup databasefor i in $(mysql-uroot -password -e "SHOW DATABASES"|tail +2); do mysqldump -uroot
-ppassword $i | gzip -9 > /mnt/database/$i.sql.gz; done
#unmount the samba shareumount /mnt/database
Post a Comment