Database backup restore invalid

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Database backup restore invalid

Post by </Solidjeuh> »

I still can't login into the bug tracker, so I post it here.
I made a database backup on my test board via ACP, when restoring the database I get this error:

Image

Tried with Gzip & bzip2

phpBB 3.2.7
PHP: 7.2.17
Database server: MySQL(i) 5.5.60-MariaDB
User avatar
KillBill.
Registered User
Posts: 625
Joined: Tue Jun 02, 2009 4:07 pm
Contact:

Re: Database backup restore invalid

Post by KillBill. »

Confirmed, restore not work

[phpBB Debug] PHP Notice: in file [ROOT]/includes/acp/acp_database.php on line 219: Undefined index: extensions
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

KillBill. wrote: Mon May 06, 2019 12:34 pm [phpBB Debug] PHP Notice: in file [ROOT]/includes/acp/acp_database.php on line 219: Undefined index: extensions
Looks like line 219 incorrectly tries to reference "extensions", instead of "extension" as intended. Making that change allowed the restore to proceed.
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Database backup restore invalid

Post by </Solidjeuh> »

Yes that worked.
changed switch ($backup_info['extensions']) to switch ($backup_info['extension'])


Someone should make a ticket for it, I can't...
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

</Solidjeuh> wrote: Mon May 06, 2019 1:55 pm Someone should make a ticket for it, I can't...
https://tracker.phpbb.com/browse/PHPBB3-16048
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: Database backup restore invalid

Post by </Solidjeuh> »

Scorpy wrote: Mon May 06, 2019 7:51 pm Or should we all just wait for phpBB 3.2.8?
If you don't use the "restore" function, you can just leave it for now. I never use that function. Just tested it today because KillBill said it was not working.
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

Agreed this isn't something to recommend as an "everybody should go do this right now" scenario. Since it's database restore, and hopefully you need to use that zero times between now and the next release. 😁 But for anyone who does need to fix or utilize the in-application Restore option, it's definitely a fix that is quick to implement.

If you need the changes and aren't fully confident in editing line 219 the file, the attached /includes/acp/acp_database.php file for phpBB 3.2.7 contains the change. When updating your board, note that there is a file of this same name one level deeper, under /includes/acp/info/, which is not the one you intend to overwrite.

Also note that the database backup in question here is ultimately just a UTF8-encoded text file containing SQL commands, as are the database backups by many tools. Even outside of this phpBB 3.2.7-related scenario, if you were ever in a jam where phpBB's ACP and/or the ACP Restore function was unavailable to you, note that you could also expect success in using your hosting account's phpMyAdmin or other database tool to restore this backup.
Attachments
acp_database.php
(13.97 KiB) Downloaded 47 times
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

You're welcome. 3Di has also created the actual phpBB code change submission for us on this issue, in case that helps anyone else visually confirm the intended and correct change.
User avatar
Joyce&Luna
Registered User
Posts: 306
Joined: Wed Oct 14, 2015 3:46 pm
Location: Germany
Name: Anke
Contact:

Re: Database backup restore invalid

Post by Joyce&Luna »

The backup from Store can be uploaded with phpMyAdmin.
But the phpBB version jumps back to phpBB 3.2.5. The error must already have been in phpBB 3.2.6.
Because before I switched to 3.2.7, I had 3.2.6.
Only if you update phpBB 3.2.7 again, everything is okay again.
My contributions are translated from German to English by google. This can lead to misunderstanding.

phpBB Style Design
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

Joyce&Luna wrote: Tue May 07, 2019 11:05 pm But the phpBB version jumps back to phpBB 3.2.5.
Agreed. Regardless of what method you use to restore the backup, the data on your board when you're finished with a successful restore is going to be the data that was in the backup. Which isn't "specifically 3.2.5", and would be whatever version was installed at the time the backup was made hours / days / weeks / months / years ago.

Unless the restored backup was from the same version you're currently running, a new "Database upgrade" installation would need to be performed to re-upgrade the data contained in the restored database. (Not just the version number in the config table; upgrade processing is needed to fix-up or expand schemas and data for other purposes which are new to the later version of phpBB, too.)
Joyce&Luna wrote: Tue May 07, 2019 11:05 pm The error must already have been in phpBB 3.2.6.
You are correct. The change to remove the ability to "Download" backup files first appeared in phpBB 3.2.6, and that is when this "unable to restore" issue first appeared, too.
User avatar
Joyce&Luna
Registered User
Posts: 306
Joined: Wed Oct 14, 2015 3:46 pm
Location: Germany
Name: Anke
Contact:

Re: Database backup restore invalid

Post by Joyce&Luna »

The backup comes from the phpBB version 3.2.7
I wanted to create a clone forum.
My contributions are translated from German to English by google. This can lead to misunderstanding.

phpBB Style Design
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Database backup restore invalid

Post by EA117 »

Joyce&Luna wrote: Tue May 07, 2019 11:40 pm
Joyce&Luna wrote: Tue May 07, 2019 11:05 pm The backup from Store can be uploaded with phpMyAdmin.
But the phpBB version jumps back to phpBB 3.2.5.
The backup comes from the phpBB version 3.2.7
Not if the version in the config table was 3.2.5 upon restore. Neither phpBB's database backup, nor phpBB's or phpMyAdmin's database restore, will override or change the stored version number in the database or in the backup files.

The simple explanation would be "there actually are phpBB 3.2.5 database backups in my /store directory too, and I was actually selecting one of those older phpBB 3.2.5 backups during restore."

The seemingly less likely explanation for "I installed phpBB 3.2.7 but then a backup and subsequent restore of my database shows phpBB 3.2.5 as the database version" would be if the phpBB 3.2.7 update process had actually failed. Meaning phpBB 3.2.7 was never actually successfully set as the database version, even though the phpBB 3.2.7 files were on your board when creating the backup.

You can check any backup yourself by opening the .sql file in a suitable text editor and searching for the phpbb_config table data (or whatever your correct table prefix is) and finding the "version" row's config_value field. For example, ('version', '3.2.7', 0). If you made .tgz or other compressed backups, the .sql file is what's inside that compressed archive.
User avatar
Joyce&Luna
Registered User
Posts: 306
Joined: Wed Oct 14, 2015 3:46 pm
Location: Germany
Name: Anke
Contact:

Re: Database backup restore invalid

Post by Joyce&Luna »

I will test it again tomorrow.
I am sure that I have used the right file.
But there were others in the folder.
Maybe I had caught the wrong one, I can not exclude 100%
My contributions are translated from German to English by google. This can lead to misunderstanding.

phpBB Style Design
User avatar
Joyce&Luna
Registered User
Posts: 306
Joined: Wed Oct 14, 2015 3:46 pm
Location: Germany
Name: Anke
Contact:

Re: Database backup restore invalid

Post by Joyce&Luna »

I looked at the backup with an editor. I have probably clicked an older backup.
Sorry. :oops:
But nevertheless one can import this nevertheless over phpMyAdmin.
My contributions are translated from German to English by google. This can lead to misunderstanding.

phpBB Style Design
Post Reply

Return to “[3.2.x] Support Forum”