Restoring from backup fails

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Restoring from backup fails

Post by Lighthope » Mon May 09, 2016 5:07 am

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

User avatar
Lumpy Burgertushie
Registered User
Posts: 66335
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restoring from backup fails

Post by Lumpy Burgertushie » Mon May 09, 2016 6:37 am

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Re: Restoring from backup fails

Post by Lighthope » Mon May 09, 2016 5:04 pm

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.

User avatar
JimA
Community Team Leader
Community Team Leader
Posts: 7609
Joined: Thu Jul 31, 2008 5:54 am
Location: The Netherlands
Name: Jim Mossing Holsteyn
Contact:

Re: Restoring from backup fails

Post by JimA » Mon May 09, 2016 5:20 pm

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.
Image Jim Mossing Holsteyn - Community Team Leader
Knowledge Base | Documentation | Board rules

If you're having any questions about the rules/customs of this website, feel free to drop me a PM.

Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Re: Restoring from backup fails

Post by Lighthope » Mon May 09, 2016 6:13 pm

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.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66335
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restoring from backup fails

Post by Lumpy Burgertushie » Mon May 09, 2016 6:26 pm

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'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Re: Restoring from backup fails

Post by Lighthope » Mon May 09, 2016 6:39 pm

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.

User avatar
janus_zonstraal
Registered User
Posts: 3269
Joined: Sat Aug 30, 2014 1:30 pm

Re: Restoring from backup fails

Post by janus_zonstraal » Mon May 09, 2016 7:01 pm

Export old database
Knipsel.PNG
Delete everything from the database where you want to import.

and than import into the database
Knipsel.PNG
Sorry! My English is bat ;) !!!

User avatar
Lumpy Burgertushie
Registered User
Posts: 66335
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Restoring from backup fails

Post by Lumpy Burgertushie » Mon May 09, 2016 7:05 pm

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
janus_zonstraal
Registered User
Posts: 3269
Joined: Sat Aug 30, 2014 1:30 pm

Re: Restoring from backup fails

Post by janus_zonstraal » Mon May 09, 2016 8:17 pm

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
Sorry! My English is bat ;) !!!

User avatar
3Di
Former Team Member
Posts: 13782
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Restoring from backup fails

Post by 3Di » Mon May 09, 2016 8:56 pm

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?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Re: Restoring from backup fails

Post by Lighthope » Mon May 09, 2016 10:03 pm

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.

User avatar
3Di
Former Team Member
Posts: 13782
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Restoring from backup fails

Post by 3Di » Mon May 09, 2016 10:44 pm

Lighthope wrote:Update: Okay, got it fixed. Just needed to upload the old templates.
Which ones?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Lighthope
Registered User
Posts: 51
Joined: Fri Jun 24, 2005 11:17 pm
Contact:

Re: Restoring from backup fails

Post by Lighthope » Tue May 10, 2016 4:12 am

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?

User avatar
3Di
Former Team Member
Posts: 13782
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Restoring from backup fails

Post by 3Di » Tue May 10, 2016 4:37 am

Lighthope wrote:Is that an Atari screen as your avatar?
:ugeek: Commodore C64 ;)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity ΒΊ PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
πŸ‘¨β€πŸ« | Take a tour to | The Studio | πŸ‘¨β€πŸ«

Locked

Return to β€œ[3.1.x] Support Forum”