List:General Discussion« Previous MessageNext Message »
From:Reindl Harald Date:June 9 2012 4:09am
Subject:Re: Emergency backup from *.frm *.MYD *.MYI files
View as plain text  

Am 09.06.2012 03:29, schrieb Keith Keller:
> On 2012-06-09, Miguel Cardenas <renito73@stripped> wrote:
>> I'm still backing up and will take some time before restore the
>> system, in the mean time I want to know if I can restore the databases
>> from the *.frm *.MYD and *.MYI files, maybe creating the databases
>> again and replace them with the old data files?
> 
> If they are MyISAM tables, then you should be able to restore most of
> your tables in this fashion.  It depends on how often these tables are
> written to; if they get writes very frequently then they may be too
> inconsistent to recover.  The basic process is to create the directory
> (either with CREATE DATABASE or directly on the filesystem; make sure
> the mysql user can write the directory), then copy the files in to the
> directory (make sure nobody is doing any writes to the db during this
> process, and make sure the files are owned by the mysql user when done)

oh no, do NOT start mysqld or create datanases

copy simply the WHOLE datadir while mysqld is stopped
pn both sides and you are done, this does include any
myisam, innodb tables including myysql-user-table

before you are starting mysqld make
shure "chown -R mysqld /path/to/data/dir"

that was ot, you are done
in the worst case it is the ame as a normal crash and
reboot on a working system and needs "repair table"
on some innodb tables to repeir indexes

there is no magic or rocket science needed



Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Thread
Emergency backup from *.frm *.MYD *.MYI filesMiguel Cardenas9 Jun
  • Re: Emergency backup from *.frm *.MYD *.MYI filesKeith Keller9 Jun
    • Re: Emergency backup from *.frm *.MYD *.MYI filesReindl Harald9 Jun