Professional Web Applications Themes

Backup MySQL databases from hard disk without running instance - MySQL

Hi all, My server crashed recently and I now only have access to the hard disk. This means that I can't do a MySQL dump to backup my data. Can I still backup my data, if yes, how? Thanks in advance! Dan...

  1. #1

    Default Backup MySQL databases from hard disk without running instance

    Hi all,

    My server crashed recently and I now only have access to the hard
    disk. This means that I can't do a MySQL dump to backup my data. Can I
    still backup my data, if yes, how?

    Thanks in advance!

    Dan

    Dan Guest

  2. #2

    Default Re: Backup MySQL databases from hard disk without running instance

    > My server crashed recently and I now only have access to the hard 

    Under Windows, I found that you can copy the old tables (data directory)
    to a fresh MySQL installation and just continue working with it.

    Best regards
    --
    Willem Bogaerts

    Application smith
    Kratz B.V.
    http://www.kratz.nl/
    Willem Guest

  3. #3

    Default Re: Backup MySQL databases from hard disk without running instance

    On Mar 16, 11:04 am, Willem Bogaerts
    <maardanzonderditstuk.nl> wrote: 
    >
    > Under Windows, I found that you can copy the old tables (data directory)
    > to a fresh MySQL installation and just continue working with it.
    >
    > Best regards
    > --
    > Willem Bogaerts
    >
    > Application smith
    > Kratz B.V.http://www.kratz.nl/[/ref]

    I just tried what you suggested, and it didn't work really. The
    databases show up, and when I use SHOW TABLES, the tables are also
    shown. But as soon as I try to see the content of them (SELECT * FROM
    mytable), it tells me that the tables doesn't exist.

    Any fixes for this?

    Thanks again,

    Dan

    Dan Guest

  4. #4

    Default Re: Backup MySQL databases from hard disk without running instance

    "Dan Soendergaard" <com> wrote: [/ref]

    This works for all operating systems, not just Windows.
     

    Seems the tables are InnoDB tables and you did not copy the InnoDB
    tablespace files (and logs) as well.


    XL
    --
    Axel Schwenke, Support Engineer, MySQL AB

    Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
    MySQL User Forums: http://forums.mysql.com/
    Axel Guest

  5. #5

    Default Re: Backup MySQL databases from hard disk without running instance

    On Mar 16, 11:33 am, Axel Schwenke <de> wrote: 
    > [/ref]
    >
    > This works for all operating systems, not just Windows.

    >
    > Seems the tables are InnoDB tables and you did not copy the InnoDB
    > tablespace files (and logs) as well.
    >
    > XL
    > --
    > Axel Schwenke, Support Engineer, MySQL AB
    >
    > Online User Manual:http://dev.mysql.com/doc/refman/5.0/en/
    > MySQL User Forums: http://forums.mysql.com/[/ref]

    The tables are InnoDB, yes. I located a directory called "InnoDB" in
    the MySQL directory. It contained one file which I copied to the new
    MySQL installation. I then copied the whole "Data" directory to the
    new installation too, but I get the same result. Are the InnoDB
    tablespace files and logs located somewhere else? Should I copy
    anything else to get it to work?

    Dan

    Dan Guest

  6. #6

    Default Re: Backup MySQL databases from hard disk without running instance

    "Dan Soendergaard" <com> wrote: 
    >
    > The tables are InnoDB, yes. I located a directory called "InnoDB" in
    > the MySQL directory. It contained one file which I copied to the new
    > MySQL installation. I then copied the whole "Data" directory to the
    > new installation too, but I get the same result. Are the InnoDB
    > tablespace files and logs located somewhere else? Should I copy
    > anything else to get it to work?[/ref]

    This is all configurable. Get the my.ini file from the old installation
    and check the innodb_data_home_dir, innodb_data_file_path and
    innodb_log_group_home_dir variables for where to find the data files
    and logs. If there are nonstandard settings in my.ini, you have to copy
    them to the new my.ini.

    Default is to have none of those settings in my.ini. Then everything is
    located in datadir = $INSTALLDIR/Data. There should be files ibdata1,
    ib_logfile0 and ib_logfile1.

    Oh - and use the *exact* same version of MySQL.


    XL
    --
    Axel Schwenke, Support Engineer, MySQL AB

    Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/
    MySQL User Forums: http://forums.mysql.com/
    Axel Guest

  7. #7

    Default Re: Backup MySQL databases from hard disk without running instance

    On Mar 16, 12:44 pm, Axel Schwenke <de> wrote: 
    > [/ref]

    >
    > This is all configurable. Get the my.ini file from the old installation
    > and check the innodb_data_home_dir, innodb_data_file_path and
    > innodb_log_group_home_dir variables for where to find the data files
    > and logs. If there are nonstandard settings in my.ini, you have to copy
    > them to the new my.ini.
    >
    > Default is to have none of those settings in my.ini. Then everything is
    > located in datadir = $INSTALLDIR/Data. There should be files ibdata1,
    > ib_logfile0 and ib_logfile1.
    >
    > Oh - and use the *exact* same version of MySQL.
    >
    > XL
    > --
    > Axel Schwenke, Support Engineer, MySQL AB
    >
    > Online User Manual:http://dev.mysql.com/doc/refman/5.0/en/
    > MySQL User Forums: http://forums.mysql.com/[/ref]

    Got it to work now, incredible! I guess it was because I had
    downloaded the most recent version of MySQL.

    Thank you a lot to both of you!

    Regards,

    Dan

    Dan Guest

Similar Threads

  1. Replies: 4
    Last Post: January 14th, 08:56 AM
  2. What is LVD hard disk ?
    By Jose Perez in forum AIX
    Replies: 1
    Last Post: September 15th, 03:08 PM
  3. Running CGI through browser from local hard disk
    By Dr. John P. Costella in forum PERL Miscellaneous
    Replies: 13
    Last Post: July 19th, 12:53 PM
  4. HELP: SQL script to backup all databases
    By NoSpam in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 9th, 07:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139