MyBB Community Forums

Full Version: Install backed up forum to new server.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Sorry if this is a double thread.
I posted one a day or 2 ago and cant find it anywhere.
My server got hacked.. No biggy...
Had to reinstall server.
I have backups of the forum.
My question is once i setup the MySQL database the same as before how am i able to get the board up and running again.
I did a very recent backup of the database which has been saved with backup of forum.

Thanks if anyone can help.

DAMINK
Have all the files uploaded to the server firstly.
Then this: [Wiki: Database_Restore] (Broken link, head over to docs.mybb.com instead)
Wow fast reply rh1n0.
I will give it a go.. thankyou.

DAMINK
I dont generally run phpmyadmin.
I normally use webmin for databases and stuff.
I will try through that, but thought perhaps i could simply do a upgrade or run a certain script or something similar.
As i have the forums database backed up only.
I cant even remember what i named the database so thats why i was hoping the backed up MyBB database could handle that.
I actually lost my servers entire database backup.
You will need to find some help files for webmin then, look at how to restore backups in specific.

Best of luck.
Thanks mate.
I will give it a go and if i can get it sorted then i will certainly post it here.
Im thinkin i will start by tryin to read the sql backup for forum then hopefully it states database name.. Then create database and then perhaps try run a install.. I know it wont work.. but just to try.. Then google time. Funny really as i posted on my forum 2 days before crashing how to backup and restore a mysql. But dumb lime me backed up to a home address on the server. I intended to change of course but...... what can i say. i didnt. Actually a light bulb just lit up in my head.. Will post if it works.

DAMINK
Yep no luck.
Thought i could install via #mysqlimport but not surprising no luck.
I was wondering what about if i installed a new copy of MyBB and then only copied certain files over (which i dont at this point know) would that solve the problem?
Does the forum even save posts to some sort of text type. Or is it all stored in Sql. That is a silly question no doubt but i just dont know.

Thanks if anyone can help.

DAMINK
I will add that my database that i do have backed up was backed up via MyBB.
Not from webmin or any other method.
Does that help?
Use SSH to install the database.

mysql -uUSERNAME -p DATABASE < BACKUP_FILE.sql (replace USERNAME, DATABASE, and BACKUP_FILE with your info)

It will prompt you for the password and then import the sql into your database.

Next upload ALL the mybb files...all of them. Make sure to chmod properly the inc/settings.php to 666 the uploads to 777 and the uploads/avatars to 777. Don't upload the install directory.

If you have the old file system then even better as your members won't lose their avatars. If not then those and the attachments are forever lost.

Next you need to recreate the inc/config.php but use your own database information.

Here is an example:

<?php
/**
 * Daatabase configuration
 */

$config['dbtype'] = 'mysql';
$config['hostname'] = 'localhost';
$config['username'] = 'USERNAME';
$config['password'] = 'PASSWORD';
$config['database'] = 'DATABASE';
$config['table_prefix'] = 'mybb_';

/**
 * Admin CP directory
 *  For security reasons, it is recommended you
 *  rename your Admin CP directory. You then need
 *  to adjust the value below to point to the
 *  new directory.
 */

$config['admin_dir'] = 'admin';

/**
 * Hide all Admin CP links
 *  If you wish to hide all Admin CP links
 *  on the front end of the board after
 *  renaming your Admin CP directory, set this
 *  to 1.
 */

$config['hide_admin_links'] = 0;

/**
 * Data-cache configuration
 *  The data cache is a temporary cache
 *  of the most commonly accessed data in MyBB.
 *  By default, the database is used to store this data.
 *
 *  If you wish to use the file system (inc/cache directory)
 *  you can change the value below to 'files' from 'db'.
 */

$config['cache_store'] = 'db';

/**
 * Super Administrators
 *  A comma separated list of user IDs who cannot
 *  be edited, deleted or banned in the Admin CP.
 *  The administrator permissions for these users
 *  cannot be altered either.
 */

$config['super_admins'] = '1';

?>

That's about it...I guess you need to upload all your old plugins too as they MIGHT have had database or template changes.

Let us know how it goes.
DAMINK Wrote:Yep no luck.
Thought i could install via #mysqlimport but not surprising no luck.
I was wondering what about if i installed a new copy of MyBB and then only copied certain files over (which i dont at this point know) would that solve the problem?
Does the forum even save posts to some sort of text type. Or is it all stored in Sql. That is a silly question no doubt but i just dont know.

Thanks if anyone can help.

DAMINK

Everything is stored in the SQL Database.

DAMINK Wrote:I will add that my database that i do have backed up was backed up via MyBB.
Not from webmin or any other method.
Does that help?

Not really, it should still contain the same information.
Thanks heaps, really thankyou.
I will give it a go and let you know.
Thanks again.
Just to clarify.
My forum is hosted on a local system so i have complete access.
I have the backup of the forum on the same system on a different drive.
I did try mysql -u username -p database <file with no luck.
I havent tried changing the /inc/confi.php file yet... as i have it available and created the database with the same details as it.
What i get at the moment is simply a white screen.
No errors visible just a white screen.
I will try some more tomorrow as my son is hastling me constantly and i need to spend some "quality time"
Thanks guys..
I think im nearly there.

DAMINK
I tried everything labrocca said to do.
The sql databases have been installed. I can see them but my forum isnt working.
I copied entire forum in its original structure using the same name as previous ie mydomain.com/forum also created the database using same info as previous.
I chmoded the files needed as labrocca sudjested.
I also tried deleting the install file which was still there although it did have the lock in it.
I am still getting a white screen in place of my fourm.

Would it work if i deleted the database and then reinstalled a new copy of MyBB then updated the forum with the backed up database?


Anyone have any ideas?

DAMINK
Ok an update on my problem.
Seems that MyBB is having trouble finding my database.
I tried a new install and got this error.
Supported DB Extensions: = None.
Well i know i have mysql installed and running.
So i thought maby its php-mysql package needed to get it to run but that did not help.
Does anyone know perhaps whats wrong here.
Am i missing a couple of packages etc.
My server has just been reinstalled so has only minimum pagckages installed.

Thanks if anyone can help here.

DAMINK
Seems it was php-mysql that i was missing. Just had to reboot server.
Will hopefully post shortly now stating its running well Toungue
got it installed and running now.
Most of my old stuff is there but now a new problem.
When i try access any topics it gets a 404 error.
Page not there.
This is for all posts threads etc.

Any help on the new problem?
Try uploading your showthread.php file. Post your forum's URL if the problem is still not fixed.

Please try not to post several times in a row within 24 hours. Use the [Image: postbit_edit.gif] button to edit your post and add to it instead of making a new reply. Thanks
Thanks for the reply DennisTT.
The show config file was uploaded with the rest of the files.
I just double checked to make sure then.
The URL to the forum is http://www.damink.com.au/board/
And noted i wont double post again.
Sorry about that.

DAMINK
Pages: 1 2