Gossamer Forum
Home : Products : Gossamer Links : Discussions :

backup database import problems

Quote Reply
backup database import problems
Hello! I just moved to a new server (LSQL2.2) and I'm having problems getting LSQL to find my data.

I did a mysql data dump of the old database (exporting data and structures) then imported it to the database on the new server (using mysql shell commands). Then I installed LSQL and pointed it to the new database.

Now MYSQLman can see the data (all the categories and tables are there), but I can't see any tables in LinksSQL. I tried going to Setup:SQL Server: and selected "Load table info from an existing set of tables (or resync the def files if you have changed your defs manually)"

That didn't help.

So I deleted all the def files and uploaded the ones from my old server

That didn't help either.

Can somebody help me get LSQL to find the data?

thanks

Last edited by:

kerbouchard2: Jun 15, 2005, 1:54 PM
Quote Reply
Re: [kerbouchard2] backup database import problems In reply to
Hi,

Did you update the /admin/defs/database.def file, to use the new mySQL database details/host?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] backup database import problems In reply to
Hello thanks for your reply. Yes, the database.def file correctly shows the database name, password, path, etc. I didn't upload that one from my backup. It was automatically created when I installed lsql on the new server
Quote Reply
Re: [kerbouchard2] backup database import problems In reply to
Hi,

Ok, so it sounds like you just installed a new version of LinksSQL, and then copied over your database, and set the database login details, etc?

Could you PM over your FTP/URL, and I'll take a look for you? (no charge =)). It sounds like either your data wasn't inputted, or one of your paths are not set correctly.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] backup database import problems In reply to
In Reply To:
Ok, so it sounds like you just installed a new version of LinksSQL, and then copied over your database, and set the database login details, etc?[/quote]

No, there is a small difference. I created a new database on a new server, copied the data into the new database and then installed Links SQL and linked it to the new database by setting the login details etc.. This is an old installation that was running before on a different host.

In Reply To:

It sounds like either your data wasn't inputted, or one of your paths are not set correctly.[/quote]

I can see the data in MySQL man when I launch it from within Links SQL so I'm assuming that the data is there and the paths are correct.

My process was as follows:

1. export data from current host using mysql shell commands
2. create new mysql database on new host
3. import data using mysql shell commands
4. install Links SQL indicating new database name, path, password, etc

What should I do from there???

After step 4 that i tried a variety of things to get the data to show up, but it hasn't worked yet
Quote Reply
Re: [kerbouchard2] backup database import problems In reply to
Hi,

Personally, I would do it in this order;

1. export data from current host using mysql shell commands
2. create new mysql database on new host
3. install Links SQL indicating new database name, path, password, etc
4. import data using mysql shell commands


The reason for this, is that when you install... it can mess up the data in your database (as a normal install, it doesn't expect to find any data).

There's not a lot else I can suggest otherwise Unsure

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] backup database import problems In reply to
I'll try that. The data looks OK in mysql man

I just realized that i exported from lsql 2.0 and am importing into 2.2 do I need to use the database:import/export command to update the def files?
Quote Reply
Re: [kerbouchard2] backup database import problems In reply to
Hi,

LinksSQL 2.0 and 2.2 are *VERY* different versions ;) I'd suggest installing version 2.0 again (email support @ gossamer-threads.com, with your details, if you need to get hold of it), and then once you've done that, upgrade to 2.2 (or even better, you may want to upgrade to 3.0.2 Smile).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] backup database import problems In reply to
aha! That's a good idea. Thanks for your help
Quote Reply
Re: [kerbouchard2] backup database import problems In reply to
Got back to this today. thanks for your help Andy. Thinking about versions got me moving in the right direction so I didn't need to install an older version and then update.Sly

The problem was very simple. The old version of LinksSQL used the table prefix "links_" the new version uses the prefix "lsql_" That is why I could see the data in MySQLMan but the program wouldn't import it. Pirate MYSQLMan also showed me the old tables with the prefix "links_" and the new tables with the prefix "lsql_" that it created when trying to read the data. After I figured out what was going on, it took exactly two minutes to install the backup data.

I can share some other tips, to help people save A LOT of time as compared to some other solutions posted here, beginning where I needed to begin last week Smile

A lot of threads in this forum talk about importing .def files. The .def files contain all the mods you might have made to the default fields in the links and category tables. So you need those changes in order to successfully import your data. But if you have a backup of your database that was created as a dump, all that information is contained in the data file.

1. Use mysql commands from the shell to restore your backup into the database.

2. Go to Admin: Setup:SQL Server: Fill in all the database info (server, name, password, etc). The default prefix will already be shown here. IN my case it was "lsql_" But if you are uploading data from an older version, open your backup file with MySQLMan or with a text editor to see what the prefix really is. In my case it was "links_" SO I changed "lsql_" to "links_" and everything worked fine.

3. On the same screen, select "Load data from an existing set of tables(or resync the def files if you have changed them manually" and submit. Now all the defs are automatically updated.

4. Next, if you're importing data from an older version, you need to account for the fact that the new version of LSQL may have new data structures. So you have to go back to Admin: Setup:SQL Server: and select "Create new default Links SQL tables in this database but do not overwrite any existing data." This will add in any tables that were not in your older version (like payments and reviews in my case). I think this step will save a lot of people from having to manually edit there data like i read about in some threads.

5. Next you go to Database: click repair tables

6. Go to Database: click rebuild search

7. Go to Database: select categories and properties from the popup menu, click GO

8. Now go to the bottom of the screen and click "resync database", do the same to resync "links", "users", and "reviews"

Presto Chango! Now your database is completely updated. click dynamic to display your directory and you can see if everything is working OK.

If everything is OK, you should back your data up again now in the current LSQL format, so next time you can restore without going through all these steps.

I hope that is helpful, let me know if there is anything wrong here.

Last edited by:

kerbouchard2: Jun 20, 2005, 4:29 AM