<< previous page   --   table of contents   --   next page >>
| | | | | | | |
  • Return to Table of Contents
  • Table of Contents

    1. General Information
    2. MySQL Installation
    3. Tutorial Introduction
    4. Database Administration
    5. MySQL Optimisation
    6. MySQL Language Reference
    7. MySQL Table Types
    8. MySQL APIs
    9. Extending MySQL

    Chapter 7:  MySQL Table Types 517 7.5.6  Backing up and Recovering an InnoDB Database The key to safe database management is taking regular backups. InnoDB Hot Backup is an online backup tool you can use to backup your InnoDB database while it is running.  InnoDB Hot Backup does not require you to shut down your database and  it  does  not  set  any  locks  or  disturb  your  normal  database  processing.   InnoDB  Hot Backup is a non-free additional tool which is not included in the standard MySQL distri- bution.  See the InnoDB Hot Backup homepage http://www.innodb.com/hotbackup.html for detailed information and screenshots. If you are able to shut down your MySQL server, then to take a 'binary' backup of your database you have to do the following:    Shut down your MySQL database and make sure it shuts down without errors.    Copy all your data les into a safe place.    Copy all your InnoDB log les to a safe place.    Copy your `my.cnf' con guration le(s) to a safe place.    Copy all the `.frm' les for your InnoDB tables into a safe place. In addition to taking the binary backups described above, you should also regularly take dumps of your tables with `mysqldump'.   The reason to this is that a binary le may be corrupted without you noticing it. Dumped tables are stored into text les which are human- readable and much simpler than database binary les. Seeing table corruption from dumped les is easier, and since their format is simpler, the chance for serious data corruption in them is smaller. A  good  idea  is  to  take  the  dumps  at  the  same  time  you  take  a  binary  backup  of  your database.  You have to shut out all clients from your database to get a consistent snapshot of all your tables into your dumps.  Then you can take the binary backup, and you will then have a consistent snapshot of your database in two formats. To be able to recover your InnoDB database to the present from the binary backup described above, you have to run your MySQL database with the general logging and log archiving of MySQL switched on.  Here by the general logging we mean the logging mechanism of the MySQL server which is independent of InnoDB logs. To  recover  from  a  crash  of  your  MySQL  server  process,  the  only  thing  you  have  to  do is  to  restart  it.   InnoDB  will  automatically  check  the  logs  and  perform  a  roll-forward  of the  database  to  the  present.   InnoDB  will  automatically  roll  back  uncommitted  transac- tions which were present at the time of the crash.  During recovery, InnoDB will print out something like the following: ~/mysqlm/sql > mysqld InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 0 13674004 InnoDB: Doing recovery: scanned up to log sequence number 0 13739520 InnoDB: Doing recovery: scanned up to log sequence number 0 13805056 InnoDB: Doing recovery: scanned up to log sequence number 0 13870592
     

    Customer Support CentreMySQL Reference Manual

    Web Hosting Services
    UNIX WEB HOSTING
    MERCHANT ACCOUNTS
    DEDICATED SERVERS
    E-COMMERCE HOSTING
    SUPPORT & FAQ's
    TERMS OF USE
    Domain Services
    DOMAIN
    REGISTRATION
    MANAGE
    YOUR ACCOUNT
    SUPPORT & FAQ's
    TERMS OF USE
    Corporate Info
    ABOUT US
    OUR NETWORK
    CONTACT US
    SITE MAP
    Copyright © 2002 Dyntex Group, Inc. All Rights Reserved
  • Return to Table of Contents
  • Back to top

  • Web Hosting: Manuals & FAQ's

    1. Unix-Based Web Hosting
    2. Unix Dedicated Servers
    3. Windows Dedicated Servers
    4. CuteFTP User’s Guide
    5. CuteHTML User’s Guide
    6. WS_FTP Pro User's Guide
    7. Miva Order User's Guide
    8. Miva Merchant User's Guide