Page 1 of 1

Restoring from backup fails

Posted: Mon May 09, 2016 5:07 am
by Lighthope
Support Request Template
What version of phpBB are you using? phpBB 3.1.9
What is your board's URL? http://www.defconwarningsystem.com/phpBB3
Who do you host your board with? Hawk Host
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? No
What styles do you currently have installed? proSilver
What language(s) is your board currently using? English
Which database type/version are you using? I Don't Know
What is your level of experience? Please select your answer
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Restoring from backup fails.
Please describe your problem. Backup board using board backup. Downloaded file. Uploaded backup file to fresh installation on another server. Clicked on Restore. Board responds with either "invalid file" or does nothing, returning me to the Restore screen.

Both versions (the one I backed up from and the one I am restoring to) are version 3.1.9 of the software.
Generated by SRT Generator

Re: Restoring from backup fails

Posted: Mon May 09, 2016 6:37 am
by Lumpy Burgertushie
hard to tell what you are doing from your description.

to install on a new server from a backup:

1. download all files from old server using ftp.
2. using whatever backup method you choose, make a backup of the database from the old server.
3. create new blank database on the new server.
4. using ftp, upload to the new server all the phpbb files/folders that you backed up before.
5. using phpmyadmin or whatever your host provides, do a import of your database backup to your new blank database.
that should do it.


robert

Re: Restoring from backup fails

Posted: Mon May 09, 2016 5:04 pm
by Lighthope
Lumpy Burgertushie wrote:hard to tell what you are doing from your description.
I'm not sure what additional information you are looking for.
to install on a new server from a backup:

1. download all files from old server using ftp.
2. using whatever backup method you choose, make a backup of the database from the old server.
3. create new blank database on the new server.
4. using ftp, upload to the new server all the phpbb files/folders that you backed up before.
5. using phpmyadmin or whatever your host provides, do a import of your database backup to your new blank database.
that should do it.
I did everything you said except for copying the old board files. I went with a fresh install.

After reading your message, I copies all the old board files and now I get a general error. At least before I could access the board. The only thing that didn't work was restore from backup.

So I am going to reinstall the board again. Now just need to figure out why restoring from backup isn't working.

Re: Restoring from backup fails

Posted: Mon May 09, 2016 5:20 pm
by JimA
Do you still have the original database running somewhere? Because it's preferable to use a database management tool like phpMyAdmin to make back-ups over phpBBs ACP backup system.

Re: Restoring from backup fails

Posted: Mon May 09, 2016 6:13 pm
by Lighthope
JimA wrote:Do you still have the original database running somewhere? Because it's preferable to use a database management tool like phpMyAdmin to make back-ups over phpBBs ACP backup system.
When attempting to import the database through phpbyadmin, it results in the error "#1062 - Duplicate entry 'rand_seed_last_update' for key 'PRIMARY' "
Error

SQL query:

-- -- Dumping data for table `phpbb_config` -- INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('active_sessions', '0', 0), ('allow_attachments', '1', 0), ('allow_autologin', '1', 0), ('allow_avatar', '1', 0), ('allow_avatar_local', '1', 0), ('allow_avatar_remote', '1', 0), ('allow_avatar_upload', '0', 0), ('allow_avatar_remote_upload', '0', 0), ('allow_bbcode', '1', 0), ('allow_birthdays', '0', 0), ('allow_bookmarks', '1', 0), ('allow_emailreuse', '0', 0), ('allow_forum_notify', '1', 0), ('allow_mass_pm', '1', 0), ('allow_name_chars', 'USERNAME_CHARS_ANY', 0), ('allow_namechange', '0', 0), ('allow_nocensors', '1', 0), ('allow_pm_attach', '0', 0), ('allow_pm_report', '1', 0), ('allow_post_flash', '1', 0), ('allow_post_links', '1', 0), ('allow_privmsg', '1', 0), ('allow_quick_reply', '1', 0), ('allow_sig', '1', 0), ('allow_sig_bbcode', '1', 0), ('allow_sig_flash', '0', 0), ('allow_sig_img', '1', 0), ('allow_sig_links', '1', 0), ('allow_sig_pm', '1', 0)[...]

MySQL said: Documentation
#1062 - Duplicate entry 'rand_seed_last_update' for key 'PRIMARY'
I have to admit, this has me completely baffled. Restoring a database this way should be the simplest of things.

Re: Restoring from backup fails

Posted: Mon May 09, 2016 6:26 pm
by Lumpy Burgertushie
does your import sql file have the "drop table" command for each table?
and/or are you trying to import it to an already existing database?


robert

Re: Restoring from backup fails

Posted: Mon May 09, 2016 6:39 pm
by Lighthope
Lumpy Burgertushie wrote:does your import sql file have the "drop table" command for each table?
and/or are you trying to import it to an already existing database?


robert
I am attempting to import it into the database that was populated when I installed phpBB. I tried clearing out all the data but leaving the fields intact hoping that would solve the problem, but no luck.

However, I can do this any way that would be the least susceptible to error.

What is your suggestion as to exporting the data? And how should I import it?

If I create a fresh table, I don't know how to link it to phpBB without destroying the data when installing phpBB.

Re: Restoring from backup fails

Posted: Mon May 09, 2016 7:01 pm
by janus_zonstraal
Export old database
Knipsel.PNG
Delete everything from the database where you want to import.

and than import into the database
Knipsel.PNG

Re: Restoring from backup fails

Posted: Mon May 09, 2016 7:05 pm
by Lumpy Burgertushie
I am not sure what you are doing.

your backup file would normally have something like this in it:

Code: Select all

DROP TABLE IF EXISTS `phpbb_acl_groups`;
CREATE TABLE IF NOT EXISTS `phpbb_acl_groups` (
for each table. If it does not, then it is trying to insert the same tables that are already in the database you are importing to. therefore , you will get the duplicate error messages.

If your sql file does not have that for each table then you need to empty the database that you are trying to import into before you attempt the import.

or, maybe just create a new blank database then import your old database into it.
then, edit your current config.php file to point to that database instead of the other one.


robert

Re: Restoring from backup fails

Posted: Mon May 09, 2016 8:17 pm
by janus_zonstraal
Due to a bug in the phpBB software, we are having difficulty loading the board data. We are working on a solution.
This message on your site is not so nice :(
There is nothing wrong with the phpbb software

Re: Restoring from backup fails

Posted: Mon May 09, 2016 8:56 pm
by 3Di
A liitle bit of confusion here. You need to keep the new database on place but delete (DROP) all the tables from it BEFORE to import you DB backup. And only IF your DB Backup contains the instruction:
CREATE TABLE IF NOT EXISTS

Everything depends on your backup, how has been made.
For sure having it done via the phpBB ACP facility doen't helps.
Have you - by any chance - the possibility to recreate the original backup from phpmyadmin or a similar tool?

Re: Restoring from backup fails

Posted: Mon May 09, 2016 10:03 pm
by Lighthope
3Di wrote:Have you - by any chance - the possibility to recreate the original backup from phpmyadmin or a similar tool?
Yes.

Here's the progress I've made so far:

I made a backup of the old database using myphpadmin.

I created a new database on the new server and used myphpadmin to import the old database into.

I created a second database, calling it "test", and installed phpBB, pointing it to the "test" database.

I then edited the config file and changed the database to the correct one.

So it looks like the data is now in place, but the board is still broken. I think it may have to do with missing extensions. I am going to reinstall those and see how it goes.

Update: Okay, got it fixed. Just needed to upload the old templates.

So problem's solved. Thank you everyone for the help.

Re: Restoring from backup fails

Posted: Mon May 09, 2016 10:44 pm
by 3Di
Lighthope wrote:Update: Okay, got it fixed. Just needed to upload the old templates.
Which ones?

Re: Restoring from backup fails

Posted: Tue May 10, 2016 4:12 am
by Lighthope
3Di wrote:
Lighthope wrote:Update: Okay, got it fixed. Just needed to upload the old templates.
Which ones?
The proSilver and one other. We made a slight modification to them and (for some odd reason) the originals are not working correctly.

I have since uploaded the templates and they are working. Just need to get the extensions back in and everything should be back to norbal. :D

Is that an Atari screen as your avatar?

Re: Restoring from backup fails

Posted: Tue May 10, 2016 4:37 am
by 3Di
Lighthope wrote:Is that an Atari screen as your avatar?
:ugeek: Commodore C64 ;)