Teamwolf2000 Posted February 28, 2008 Share Posted February 28, 2008 Hi, I am running 5.051 and would like to backup my data files and ftp to another remote server. This is just as a backup for a complete system fail. I have written the script and it all works well, it is shedualed to run overnight. I just wanted to check that if I do back up these data files, in the event of a major systems crash I will be able to restore them onto my new box. Currently I copy the entire contents of D:\MySQL\data which is the location of my database files. Could someone let me know if these can be resored if ever i need to. Thanks very much, TW2 Quote Link to comment Share on other sites More sharing options...
fenway Posted February 28, 2008 Share Posted February 28, 2008 MyISAM tables? Quote Link to comment Share on other sites More sharing options...
Teamwolf2000 Posted February 28, 2008 Author Share Posted February 28, 2008 yes they are. Could you maybe explain the difference and what it would make to the data files, if its not too much trouble. I would be very greatful. Many Thanks, TW2 Quote Link to comment Share on other sites More sharing options...
fenway Posted February 28, 2008 Share Posted February 28, 2008 I don't really work with InnoDB tables, but it's a completely different format for both data & index files, has namespaces, etc. etc. With MyISAM, as long as the tables aren't being written to, you can safely copy FRM/MYD/MYI files. Quote Link to comment Share on other sites More sharing options...
fenway Posted February 28, 2008 Share Posted February 28, 2008 Also, from Diamond notes today: You can copy the three files (table_name.frm, table_name.MYI, and table_name.MYD) that form a MyISAM table from one server to another and just add them to the appropriate database directory and they will “appear” in the new database. However, with Innodb this is not possible. To copy Innodb databases you either need to dump the database/tables involved and re-import or copy the entire dataset and tablespace files from one server to another. One caveat about the MyISAM table copy, you should lock the table while copying it to keep the copy from being corrupt due to changes to the file during the copy operation. Also, check and make sure your owner/permissions are the same after the copy. Quote Link to comment Share on other sites More sharing options...
Teamwolf2000 Posted February 28, 2008 Author Share Posted February 28, 2008 Many thanks for all your help. Cheers. :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.