Hi all, I maintain my company's wiki (http://wiki.carbon-360.com/), and a quite a while back managed to lose a few pages of content after a bodged upgrade. I tried to simply import the data back in from a backup, but it failed and I gave up as I had more pressing things to do. Can I get the content back from a edit:blog blob stored in a backup (text file)? I'll only be doing it for a few pages, so could do it page-by-page, based on the title which is held in plain text.
unfortunately, it's well beyond that. I've got a new install running now, so it's just the data I want out now. Can I just enter the text-string from the file into the DB? Basically I just want to unencode it.
actually, maybe it's worse than I thought! where's the actual content stored? (i.e. which field of which table?!) edit: even the titles in the page table are some crazy hex value. I'm thinking that perhaps this is a lost cause. The only plain text is in the searchindex table, and that of course has no formatting, punctuation or even capital letters!
depending on how you did the mysql backup you should be able to restore the backup to a different database, then select what you want and copy past it. i dono how you did you backup but i do mysqldump so a restore would go something like. mysql -u root -p Database_Of_Greatness < Backup_of_greatness.sql
thanks for the suggestions, but it's actually more complicated than that since even then the data is somehow encoded.
Could be anything jazzle, need to know more info. We're not talking about binary logs are we? (just to be sure?) Also, it could be "encoded" either because it's in a charset that your viewer doesn't support, or it's blob data which is gonna look like a load of crap anyway when viewed as text... Like I said... need error messages and/or more info!
ah, looks like I typo'd in the first post, though I got it right in the thread title. It is BLOB data. I assume that that can that be unencoded, but have no idea how.
Are you using phpmyadmin at all? There is an option in the config file to set it so you can see and edit blog fields (set off by default IIRC).
Yeah, you can read/write from them If you are unable to overright the config file that is already there, then you could always upload phpmyadmin yourself and then you'll have complete control over the config file
Has others have asked, how exactly did you create the backup and how are you trying to restore it? Mediawiki uses the serialize and unserialize functions a lot. The encoded data is likely to be the result of the first function.
Thanks, I think that that is almost certainly what I've got in the backup, but there appears to be more to the decoding in this instance. (I am using MediaWiki, I should have said, sorry.) I thought blobs must be a mysql encoding for text, I guess not. The backup was made using phpmyadmin, so it's just a simple text file. It's tempting to upload my own copy of phpmyadmin, and copy the blobs over to a dummy page, but I think that'll be more effort than just editing the searchindex entries. (There aren't many pages, and they're not particularly long either.)
if it was serialised by media wiki to start with then you should be ok copying the encoded stuff straight into the database without having to decode it first... media wiki will only encode it again anyway!!
very true. (though with the hosted install of phpmyadmin* I'd have to do it via fileupload, which would be more than a little time consuming) I don't think it's going to be worth it now anyway, so thanks for all the suggestions. *- stupid name, I always want to write 'myphpadmin', and shouldn't it mention mysql?!