Fork me on GitHub
Subscribe 2

Ticket #603 (invalid enhancement)

Allow to import / migrate / convert from sql file

  • Created: 2012-01-22 06:20:42
  • Reported by: leonardo
  • Assigned to: None
  • Milestone: None
  • Component: None
  • Priority: normal

It would be much faster if we could pass a local sql file (a sql dump) via the command line.

Something like this:

php converter.php -f forum_name -t old_db_type --database-file database-file.sql -r old_db_prefix -c old_db_charset

where --database-file is the flag and database-file.sql is the exported database from the old forum.


leonardo 2012-01-22 06:21:43

  • Description changed. (Diff)

daris 2012-01-22 08:20:00

Well, I can add a possibility to import a sql dump into temporary database first, but you'll have to specify database host, db name (must already exist), username and password too, because it doesn't know where to import sql dump tongue

leonardo 2012-01-22 08:21:18

I thought it would grab those from the FluxBB config, as the web interface does... no?

daris 2012-01-22 08:23:44

The table prefix may be different in config.php than the one in sql dump, what in that case? smile

leonardo 2012-01-22 08:30:42

i thought the flag -r old_db_prefix should take care of that?

maybe im missing something... but just in case, let me clarify what I meant:

Replace the old host, old db-name, old user-name, old passwd for a local-sql-file flag. the other options should be kept, as to avoid the problems you mention smile

is that ok? or i'm missing something?

daris 2012-01-22 08:36:55

leonardo wrote:

is that ok? or i'm missing something?

Err, you're right, I misunderstood your previous reply (thought about fluxbb database instead of old forum db).

daris 2012-01-22 08:53:38

By the way, can't you run the:

mysql -u root phpbb < sql_dump.sql

command? It's easier than implementing sql dump import in PHP wink

leonardo 2012-01-22 21:04:34

I guess that's an option!!

I will think about it a while, to see if there is a case I thought wouldn't work that way... smile

daris 2012-08-29 11:39:32

  • Status changed from open to invalid.