Basically, here is my story - was running a
remotely-hosted Debian
(Etch) dedicated server with latest PHP5/Apache2/MySQL5 installation,
as well as MediaWiki 1.11.0 (i'm 99% sure this was the on the server,
but it could have been 1.10.x). The wiki page uses the SQL database
named "wikidb". Daily, at 4am, we've had a cron job that took all the
files in an SQL folder (for example, /var/lib/mysql/wikidb ), which
were .MYI, .MYD, and .frm files of the various tables and bzipped
them, and my computer at home connected every morning at 5am via FTP
to download them. I've kept a week's worth in constant rotation for
over a year. So, I figured if we ever had a bad crash, we'd be
covered. Not the .SQL files that would have been nicer to have, but
at least something.
MYISAM or InnoDB? Unfortunately, copying the .MYI, etc, files will
not work with InnoDB tables:
http://dev.mysql.com/doc/refman/5.0/en/backup.html
"You can also create a binary backup simply by copying all table
files (*.frm, *.MYD, and *.MYI files), as long as the server
isn't updating anything. The mysqlhotcopy script uses this
method. (But note that these methods do not work if your database
contains InnoDB tables. InnoDB does not store table contents in
database directories, and mysqlhotcopy works only for MyISAM
tables.)"
Here's a thread where someone learned this the hard way:
http://www.nabble.com/MYISAM-or-InnoDB-best-for-Mediawiki--to9950685.html
Is it possible to recover a database in this method?
Even if I recover, do I actually have data in there? The file sizes
and table structure seem to indicate that my data is bunk, but maybe
since it's all text, itmakes sense that it's so small.
I was unable to do so after backing up an InnoDB by copying the
files (as you did) instead of using mysqldump. Now, I use mysqldump.
How could I ensure that I am better backed-up in the
future? Are
there ways I can improve what is backed up, and methods to recover it?
http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
Good luck. Perhaps someone who knows more can help you recover.
-rex
--
Thesaurus: ancient reptile with an excellent vocabulary.