MySQL Forums
Forum List  »  Newbie

Restore DataBases to 2nd hard drive
Posted by: Jeff Voss
Date: May 10, 2005 08:56AM

Platform FreeBSD 4.9 on a Dell PC. I Ghosted the drive to a secondary disk and put it on the secondary IDE channel. What I want to do is, after the dump of all databases takes place, I want to temporarily mount the secondary drive and restore the databases to it. This would be a nightly proccess run by cron. I know almost nothing about MySQL and am not sure if this is even possible.

I thought about doing the following script I wrote but, isn't there a nicer way to do this?

mysqldump --opt --all-databases > /smx01/profile-mysql.sql
echo "MySQL dump is complete......."
;;

newfs /dev/ad1s1g
mount /dev/ad1s1g /mnt/backups/ad1s1g
cd /mnt/backups/ad1s1d
restore -ruy -f /smx01/usr-local_dump1 /mnt/backups/ad1s1d
cd
umount /dev/ad1s1d
echo Restore to secondary hard drive complete!

Any help would be great!

Options: ReplyQuote


Subject
Written By
Posted
Restore DataBases to 2nd hard drive
May 10, 2005 08:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.