2 laibcoms Jan 03, 2008 07:49

Thanks. I found it. But I have a MySQL problem. The import is impossible from CSV file. I think it's because in the last column (for example, param = a:1:{s:9:"link_type";s:12:"ownercontact";} ), the " and/or ; screw up the export.
Which method I can use? What I want it's all the date with id=4 and and duplicating, and modifying to id=5 and so on.
I try a query. I select correctly my data but I'm stuck up there. I'm not able to copy it.
Thx
Mel
If you simply make a backup from the database, the file is in SQL language. It consists of statements to recreate the database. If you alter this file you shouldn' t have problems setting the database back. Simply use a plain text editor.
Note that this reply does not give an answer as to *what* you need to alter. I am afraid this is quit a tricky adventure since everything is related to everything. There is some interesting stuff, although deprecated, [url=http://doc.b2evolution.net/DB_schema/]here[/url].
Good luck
*edit*
typo
Afwas is spot-on here, and I'll add a tidbit I've learned the hard way: excel is really funny in how it handles the " thing. Sometimes it adds them, sometimes it removes them. I fought it for a LONG time when I had to use excel to write a javascript for use at work. My final answer was to document the exact steps one had to go through using notepad to undo the things excel did with the " character. Sloppy, but it worked.
So back on topic: using the "backup" feature of cpanel will give you a file named databasename.sql.gz which you can then rename to newdatabasename.sql.gz and then "backup restore" to a new database. Using the "export" feature in phpmyadmin will give you a file named databasename.sql which you then could use as a query in phpmyadmin to make a new database be exactly like the original database.
But it's crazy-mad stuff, meaning it'll drive you crazy and make you mad ;)
Therefore please be VERY careful with what you're doing in there. Backup everything with every method you can find, and be prepared to devote a lot of time and energy into figuring out how your exact host/server will behave.
Hi,
I did the operation 2 times because I needed to add a second one couple days after. So I post what I did in case someone need it. Maybe the method is quite "home-made-by-non-informatic-person" but it worked.
Even with some problems, I used CSV files as I can just increment very easily and copy lines. OpenOffice let you the possibility to select your character encoding, better for my french accentuated letters...
I did it with 2 empty blogs as template, any posts was there.
1st: I'm agree, make backup!!
2nd: export tables:
More than 1 year and I still have to do same job. :-/ I want to move an existing blog to archive. Quite easy, just have to change name of it. But I need to create a new blog for the current year with all same settings. If someone know how to do it, I will be happy to heard it.
I could also move posts to a new blog but the problem is that it's quite long because it does'nt have a multi-selection to do so.
Thanks
Mel
It should be in the *_widget table, all of the widget data.