[SOLVED] How to update database using CLI

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
null2
Registered User
Posts: 416
Joined: Wed Jan 20, 2010 11:03 am

[SOLVED] How to update database using CLI

Post by null2 » Sat Jan 14, 2017 7:32 pm

I have a forum with a giant database and I always get a timeout message when updinatg it. Now, I tried to update my forum from 3.1.10 to 3.2 and result was not different.

To solve that, I used to upgrade it using CLI (php ./bin/phpbbcli.php db:migrate --safe-mode). But its not working anymore. How to do it in this last release?

In time: I tried to update it in install page using several ways, no luck with that.
Last edited by null2 on Tue Jan 17, 2017 12:59 am, edited 2 times in total.
Sorry for my bad english. I'm from USA.

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24493
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: How to update database using CLI

Post by Paul » Sat Jan 14, 2017 7:52 pm

You need to use the cli in the install/ directory. The command is:

Code: Select all

./phpbbcli.php update config.yml
And create a file config.yml with

Code: Select all

updater:
    type: db_only
This will only update the database, not the files.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
null2
Registered User
Posts: 416
Joined: Wed Jan 20, 2010 11:03 am

Re: How to update database using CLI

Post by null2 » Sat Jan 14, 2017 11:10 pm

Worked!

But I had to do some changes:

I had to use the command in this way: php ./phpbbcli.php update config.yml

And in file config.yml, I had to put a TAB before "type" because spaces didnt work:

updater:
[TAB]type: db_only

Thank you!
Sorry for my bad english. I'm from USA.

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24493
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: How to update database using CLI

Post by Paul » Sat Jan 14, 2017 11:15 pm

The first thing depends on your server setup yeah. The second thing is a phpBB thing, as it doesn't support tabs in code tags
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
richey
Registered User
Posts: 608
Joined: Mon Feb 18, 2002 4:26 pm
Location: now@Cyberspace
Contact:

Re: [SOLVED] How to update database using CLI

Post by richey » Tue Aug 08, 2017 7:49 am

I get the error message
[ERROR] Could not parse YAML file config.yml
My config.yml looks exactly like the one described above (with the tab), otherwise it's empty. CRLF before the last line. What can I do… :?
.

User avatar
david63
Jr. Extension Validator
Posts: 14572
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [SOLVED] How to update database using CLI

Post by david63 » Tue Aug 08, 2017 7:53 am

richey wrote:
Tue Aug 08, 2017 7:49 am
My config.yml looks exactly like the one described above (with the tab)
Use spaces not tabs - .yml files in phpBB do not work with tabs
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Bing [Bot], Charlie_M, Fundus, Mannix_ and 20 guests