I am running MySQL on a Solaris x86 host. I am currently backing up using mqsqldump and he database is about 1GB in size. It takes about 10 mins to backup and a whopping 6.5 hours to restore. The database will continue to grow and the time it takes to restore is not acceptable.
I also need to setup relocation, but cannot get the 7 hours downtime needed to backup/recover to the remote host.
My question is this:
The MySQL datadir is on a mirrored SVM (Solaris Volume Manager) volume. Can I backup and restore in this way:
-stop application read/writes to the MySQL database
-shutdown MySQL
-break the mirror
-startup MySQL (so as to incur minimal downtime)
-start application read/writes to the MySQL database
-mount the offline mirror disk
-backup the MySQL data datadir using tar
-once tar complete resync the mirror disk
-copy tar file to the remote MySQL host (with the same OS and MySQL version and file system structure)
-untar the datadir
-startup MySQL on the remote host
Will taking a tar of a shutdown MySQL data directory give me a non-corrupt recoverable backup?
Thanks in advance.
I also need to setup relocation, but cannot get the 7 hours downtime needed to backup/recover to the remote host.
My question is this:
The MySQL datadir is on a mirrored SVM (Solaris Volume Manager) volume. Can I backup and restore in this way:
-stop application read/writes to the MySQL database
-shutdown MySQL
-break the mirror
-startup MySQL (so as to incur minimal downtime)
-start application read/writes to the MySQL database
-mount the offline mirror disk
-backup the MySQL data datadir using tar
-once tar complete resync the mirror disk
-copy tar file to the remote MySQL host (with the same OS and MySQL version and file system structure)
-untar the datadir
-startup MySQL on the remote host
Will taking a tar of a shutdown MySQL data directory give me a non-corrupt recoverable backup?
Thanks in advance.