• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

MySQL Backup Question

D

DoobyWho

Guest
I have two MySQL backup questions:


(1) Is there a way to do an incremental MySQL backup, specifically where each database is it's own .SQL file?

I know you can do an incremental backup and I know you can backup each to it's own .sql, but both together?



(2) How can this be modified to work for RHE3? I found this script and it looks like a decent mysql backup script if the above question isn't possible.

#!/bin/sh
# mysqlback.sh -- do mysql database dumps -- t|<evans
# Sun Jun 22 11:00:35 EDT 2003
##############################
PATH=/usr/local/bin:$PATH
BACKDIR=/data/backups/mysql
DAYSBACK=7
export PATH BACKDIR DAYSBACK
#
########################
# clean up backups older
# than $DAYSBACK
########################
cd $BACKDIR
find . -mtime +$DAYSBACK -exec rm -f {} \;
#########################
# get a list of databases
#########################
cat <<EOF > tmpsql$$
show databases;
EOF
mysql -u root --password=XXXXX < tmpsql$$ | sed '/Database/d' >
dblist$$
############################
# back each one up in turn;
# --opt locks tables during
# backup, so no need to shut
# down mysql; but access will
# be denied during backup
#
# we also pipe through gzip
############################
for DB in `cat dblist$$`
do mysqldump -u root --password=XXXXX --opt --flush-logs $DB | gzip
\
> $DB.`date '+%m.%d.%y'`.gz
done
###################
# empty the logfile
###################
rm /var/mysql/mysql.log.*
cat /dev/null > /var/mysql/mysql.log

#######
# email
#######
ls -l $BACKDIR | /usr/bin/mailx -s "MySQL Backup Completed" admin
##########
# clean up
##########
rm dblist$$ tmpsql$$
 
Back
Top