backing up database

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
kushcat
Registered User
Posts: 4
Joined: Mon Dec 09, 2024 5:38 am

backing up database

Post by kushcat »

Hi when i read this guide on how to transfer your phpbb forum to another host
https://www.phpbb.com/support/docs/en/3 ... or-domain/

it says to backup the database
Under the Data-dump options, make sure the radio button next to "include column names in every INSERT statement" is selected.

but mine has this setting as the default option, not sure what the difference is or what one i should use the first or the third option?
Screenshot 2025-01-01 181639.png
You do not have the required permissions to view the files attached to this post.
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10599
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: backing up database

Post by Noxwizard »

Either one is fine.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
kushcat
Registered User
Posts: 4
Joined: Mon Dec 09, 2024 5:38 am

Re: backing up database

Post by kushcat »

can you explain what it means and what difference it makes whether you choose the 1st or the 3rd? im curious
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10599
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: backing up database

Post by Noxwizard »

The difference is shown in the "example" part for what is placed into the backup file.
  1. Adds column names to the insert statement:

    Code: Select all

    INSERT INTO table_name (col1, col2, col3) VALUES (val1, val2, val3);
  2. Does not add column names, but inserts multiple rows of data at once:

    Code: Select all

    INSERT INTO table_name VALUES (val1, val2, val3), (val4, val5, val6), (val7, val8, val9);
  3. Does both of the above:

    Code: Select all

    INSERT INTO table_name (col1, col2, col3) VALUES (val1, val2, val3), (val4, val5, val6), (val7, val8, val9);
  4. Only inserts one row at a time, without column names:

    Code: Select all

    INSERT INTO table_name VALUES (val1, val2, val3);
Column names are useful since it ensures that there's no mismatch between the table definition and what it's expecting. If there's a missing column, but the table uses default values, you may not realize your data is mismatched and just added a value for you.

#2 & #3 insert multiple rows of data once. This will make the backup restore faster since it doesn't have to do everything one row at a time. The tradeoff is if your server doesn't have enough memory or processing time to get that entire statement executed, it will fail and the none of that query will get inserted.

#1 will be slower and generate a larger SQL backup file, but each query is pretty much guaranteed to run. phpMyAdmin can generally resume loading a backup like this if it times out. For #2, phpMyAdmin may not be able to resume from it if there's a single query that's bogging it down.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
kushcat
Registered User
Posts: 4
Joined: Mon Dec 09, 2024 5:38 am

Re: backing up database

Post by kushcat »

so 3 if it i want it to be faster and 1 if i want it to work guaranteed, no difference in how my database handles the data?
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10599
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster

Re: backing up database

Post by Noxwizard »

No, there's no difference in the data, it's all the same.
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

Return to “[3.3.x] Support Forum”