MyBB Community Forums

Full Version: Problem restoring backup from earlier version
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello

I have just installed version 18.22 of MyBB and am trying to restore an older backup that was backed up using 18.20. 

The backup includes all of the tables and data etc that I could save at the time.

However using phpMyAdmin it says the restore was successful into the database that was created when Softaculous installed the latest version of MyBB.  However, why is the forum still empty after the restore procedure ? 

cheers
david
Maybe they have different table prefixes or even in different databases. Try review the documentation on database restore: https://docs.mybb.com/1.8/install/databa.../#optional
(2020-05-24, 12:38 PM)noyle Wrote: [ -> ]Maybe they have different table prefixes or even in different databases. Try review the documentation on database restore: https://docs.mybb.com/1.8/install/databa.../#optional

This is what the database structure looks like after the import. Not sure what it is supposed to look like.

cheers

[attachment=42915]
It this is the database you'd like to restore, then edit the file inc/config.php:


$config['database']['database'] = 'analogpr_mybb550';
$config['database']['table_prefix'] = 'mybb1b_';

Hi noyle

This is what is in my config.php

cheers
david

<?php
/**
 * Database configuration
 *
 * Please see the MyBB Docs for advanced
 * database configuration for larger installations
 * https://docs.mybb.com/
 */

$config['database']['type'] = 'mysqli';
$config['database']['database'] = 'analogpr_mybb550';
$config['database']['table_prefix'] = 'mybb1b_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = 'analogpr_mybb550';
$config['database']['password'] = '****************';

/**
 * 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 (cache/ directory), MemCache (or MemCached), xcache, APC, or eAccelerator
 *  you can change the value below to 'files', 'memcache', 'memcached', 'xcache', 'apc' or 'eaccelerator' from 'db'.
 */

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

/**
 * Memcache configuration
 *  If you are using memcache or memcached as your
 *  data-cache, you need to configure the hostname
 *  and port of your memcache server below.
 *
 * If not using memcache, ignore this section.
 */

$config['memcache']['host'] = 'localhost';
$config['memcache']['port'] = 11211;

/**
 * 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';

/**
 * Database Encoding
 *  If you wish to set an encoding for MyBB uncomment
 *  the line below (if it isn't already) and change
 *  the current value to the mysql charset:
 *  http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
 */

$config['database']['encoding'] = 'utf8';

/**
 * Automatic Log Pruning
 *  The MyBB task system can automatically prune
 *  various log files created by MyBB.
 *  To enable this functionality for the logs below, set the
 *  the number of days before each log should be pruned.
 *  If you set the value to 0, the logs will not be pruned.
 */

$config['log_pruning'] = array(
	'admin_logs' => 365, // Administrator logs
	'mod_logs' => 365, // Moderator logs
	'task_logs' => 30, // Scheduled task logs
	'mail_logs' => 180, // Mail error logs
	'user_mail_logs' => 180, // User mail logs
	'promotion_logs' => 180 // Promotion logs
);

/**
 * Disallowed Remote Hosts
 *  List of hosts the fetch_remote_file() function will not
 *  perform requests to.
 *  It is recommended that you enter hosts resolving to the
 *  forum server here to prevent Server Side Request
 *  Forgery attacks.
 */

$config['disallowed_remote_hosts'] = array(
	'localhost',
);

/**
 * Disallowed Remote Addresses
 *  List of IPv4 addresses the fetch_remote_file() function
 *  will not perform requests to.
 *  It is recommended that you enter addresses resolving to
 *  the forum server here to prevent Server Side Request
 *  Forgery attacks.
 *  Removing all values disables resolving hosts in that
 *  function.
 */

$config['disallowed_remote_addresses'] = array(
	'127.0.0.1',
	'10.0.0.0/8',
	'172.16.0.0/12',
	'192.168.0.0/16',
);

/**
 * Admin CP Secret PIN
 *  If you wish to request a PIN
 *  when someone tries to login
 *  on your Admin CP, enter it below.
 */

$config['secret_pin'] = '';
This config.php file seems fine to me. Could you please try to erase the file content of inc/settings.php and navigate to your forum again to see if it's OK?
(2020-05-24, 12:05 PM)lemnoc Wrote: [ -> ]Hello

I have just installed version 18.22 of MyBB and am trying to restore an older backup that was backed up using 18.20. 

The backup includes all of the tables and data etc that I could save at the time.

However using phpMyAdmin it says the restore was successful into the database that was created when Softaculous installed the latest version of MyBB.  However, why is the forum still empty after the restore procedure ? 

cheers
david

Not to butt in, but exactly how did you back this up?  The bolded statement makes me curious.

Is the database populated if you browse those tables in phpmyadmin?  The sizes in your screenshot appear quite small, although I appreciate you haven't sorted on size.  If so, just a matter of making the right connection I'd say.

I restore a backup of my live forum into a test environment almost weekly.  Always via my host panel, which is the same as a command line mysqldump --add-drop-table [yourDB] > [filename.sql].  So the sql file might speak volumes.

cheers...
(2020-05-26, 10:35 AM)noyle Wrote: [ -> ]This config.php file seems fine to me. Could you please try to erase the file content of inc/settings.php and navigate to your forum again to see if it's OK?

Tried that but no cigar Sad

cheers

(2020-05-26, 12:07 PM)nixer55 Wrote: [ -> ]
(2020-05-24, 12:05 PM)lemnoc Wrote: [ -> ]Hello

I have just installed version 18.22 of MyBB and am trying to restore an older backup that was backed up using 18.20. 

The backup includes all of the tables and data etc that I could save at the time.

However using phpMyAdmin it says the restore was successful into the database that was created when Softaculous installed the latest version of MyBB.  However, why is the forum still empty after the restore procedure ? 

cheers
david

Not to butt in, but exactly how did you back this up?  The bolded statement makes me curious.

Is the database populated if you browse those tables in phpmyadmin?  The sizes in your screenshot appear quite small, although I appreciate you haven't sorted on size.  If so, just a matter of making the right connection I'd say.

I restore a backup of my live forum into a test environment almost weekly.  Always via my host panel, which is the same as a command line mysqldump --add-drop-table [yourDB] > [filename.sql].  So the sql file might speak volumes.

cheers...

As I recalled each time I backed it up I selected both the structure and data. The size of the backups has grown each time I backed it up so I assume the content was being backed up but nothing when I restore the database. The users, the forum posts and the structure are completely missing when I restore the database Sad

cheers
(2020-05-28, 07:18 AM)lemnoc Wrote: [ -> ]As I recalled each time I backed it up I selected both the structure and data. The size of the backups has grown each time I backed it up so I assume the content was being backed up but nothing when I restore the database. The users, the forum posts and the structure are completely missing when I restore the database Sad

cheers

Not that familiar with MyBB backup - don't really use it.  But ran one on our live forum - creates the export sql file OK, although I haven't tried importing it. 

In your OP you mention restoring to the database created by Softaculous.  In the MyBB restore database docs you can see they're restoring into a new database.  Or an empty one is OK for phpmyadmin as well I think.   If you're restoring into an existing and populated database, that could be an issue.  But easily resolved by dropping all the pre-existing tables.  Or just using a new database name.  Which I'd be inclined to do anyway.  Then browse that, and look for familiar data.  The mybb_forums table should have easily recognisable stuff.

If it looks good, follow the previous instructions and hook mybb to the newly restored database instance.

cheers and good luck...
The original myBB database is still on the server and it looks like all of the info is still in it but has different prefixes to the new database tables so perhaps this is where the problem exists when the restore is attempted. Is there any way of telling MyBB to point to the older database or do I have to install MyBB manually and specify the database ?? Do I have to rename the database tables from mybb_ to mybb1b_ ?? Any suggestions ?

[attachment=42948]
Pages: 1 2