Re: Re: backing up MySQL
| From: | Hendri | Date: | Thu, 11 Sep 2003 07:20:19 +0000 |
| Subject: | Re: Re: backing up MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-30462@lists.php.net to get a copy of this message | ||
how about just hard copy /var/lib/myql/ directory
and then restore them as ordinary copy file scheme ?
it works for me, and with no something strange
Hendri,
Hobbyst Coder
-----Original Message-----
From: "nabil" <nabil.attar@aws-syria.com>
To: php-db@lists.php.net
Date: Thu, 11 Sep 2003 09:42:44 +0200
Subject: [PHP-DB] Re: backing up MySQL
use the following script
##############
#!/bin/sh
# Create the temporary copy directory
mkdir /tmp/mysql
# Get the list of MySQL Databases & copy them
for var in `find /var/lib/mysql/ -type d | \
sed -e "s/\/var\/lib\/mysql\///"`; do
mysqlhotcopy -q "$var" /tmp/mysql
done
# Tar/gzip data
date=
date -I
tar czf /tmp/mysql-$date.tar.gz -C /tmp/ mysql/
#############################
or use :
mysqldump command
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php