Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Moving to new server instructions

Quote Reply
Moving to new server instructions
I know there have been posts on this matter, but a specific how-to from GT staff for the latest version would be really appreciated.

Thank you
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
I would have expected at least a link to some other post or some short list of instructions
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

Its not a simple task.

1) You have to compress the cgi-bin files (tar cvvf cgibin.tar *)
2) You have to compress the www files (tar cvvf backup.tar *)
3) Backup your database (mysqldump --add-drop-table -u=USERNAME -pPASSWORD DATABASE_NAME > backup.sql)
4) Download all these files locally
5) Uploads to your new server
6) Decompress them (in their correct folders!), with: tar -xof file.tar
7) Then, you need to run a `grep` on the files, something like:

Replace /old/ with your old path to the admin folder
Replace /new/ with your NEW path to the admin folder

perl -p -i -e 's|/old/|/new/|g' `grep -r -l '/old/' .`

8) Re-import your database, with:

mysql -u=USERNAME -pPASSWORD DATABASE_NAME < backup.sql

Thats pretty much it - although I've put it in very simple terms =)

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!

Last edited by:

Andy: Feb 21, 2009, 12:46 AM
Quote Reply
Re: [Andy] Moving to new server instructions In reply to
Don't forget to update any domains and paths in your Config/Data.pm file, update your database login information, and update paths of the File_Directory column of all your *_Files tables (if you have file columns).

Adrian
Quote Reply
Re: [brewt] Moving to new server instructions In reply to
Hi,

Good point. Was only really making a general post, as no one else had replied to him =) Its almost impossible to cover all possible problem you may encounter in a move Sly

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] Moving to new server instructions In reply to
Thank you for your replies.

However in previous posts the suggestion was to make a clean install of GLinks on the new server, then copy the templates and import the database.

Is it still possible or not?

I am concerned that it would be a problem to replace correctly the paths in all files.
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

If you did not modify the glinks' code much, you can just installed glinks on the new server and import its mysql database onto the new server. To change to path manually is easy error-prone

Hope that helps

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Moving to new server instructions In reply to
If you do install a new copy on the new server, make sure it's the same version as the copy on the old server, otherwise you'll run into problems. Well, you *could* just re-run the upgrade code from the admin.

Adrian
Quote Reply
Re: [brewt] Moving to new server instructions In reply to
Hi Adrian,

You're right. I presumed that he uses the same version of glinks.

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Also, you would need to copy over your .def files (admin/def) files too (not database.def, as that will be written when doing the install) - but if you don't copy over the .def files, you will loose any custom fields you may have added (if you only have standard fields, then don't worry about this step :))

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] Moving to new server instructions In reply to
Thank you all for your replies.

The version installed is the latest so there is no problem with this.

Also there are not modifications in the code, but several custom (not file) fields are used, globals, plugins and the multilanguage plugin.

The aim is also to minimize downtime so making a new installation, then installing plugins, copying .def files and template files (which ones? or all of them?) and importing the database seems safer than copying over and then starting testing the paths that failed to replace correctly. Does this order of actions look correct or not?

Any suggestions?
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

Yeah, that should work fine.

Quote:
files and template files (which ones? or all of them?)

Yup - just download the whole /templates folder Smile

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] Moving to new server instructions In reply to
I am trying to proceed with this however when I try to restore the database on the new server I receive an error:

ERROR 1062 (23000) at line 559: Duplicate entry 'ΓΓΓΓΓΓ' for key 2

Any advise how to solve this?
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Mmm.. odd - I can't see the characters its showing:

Duplicate entry 'ΓΓΓΓΓΓ' for key 2

Maybe the file is corrupt?

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] Moving to new server instructions In reply to
If you make a search at Google for ERROR 1062 (23000) and mysql it seems it's known bug for version 4.1.20 that happens to use, however I don't really understand the reason this happens, so I could find a workaround to restore the database.
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

Did you add in --add-drop-table in the mysqldump command, when you made the .sql file from your original database?

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] Moving to new server instructions In reply to
Andy wrote:
Hi,

Did you add in --add-drop-table in the mysqldump command, when you made the .sql file from your original database?

Cheers

The error is the same if I make the dump with or without it.
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
....and your database is totally empty? (the one its going into)

The only reason you should get that error, is if there are 2 conflicting ID's i.e IE = 1 and another with ID = 1.

I'm still confused about the error you are getting

Quote:
Duplicate entry 'ΓΓΓΓΓΓ' for key 2

Its almost like the file is corrupt.

Is this database foreign, or is it just English characters?

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: [Taki-x] Moving to new server instructions In reply to
Is your original database clean (ie. not corrupt)? Try repairing your tables before you dump.

Adrian
Quote Reply
Re: [brewt] Moving to new server instructions In reply to
I have tried to repair tables without errors and run the mysqldump but the result is the same.
The database is with greek characters. However I have moved other databases with greek characters to the same server without running into this problem.

Have you checked this mysql bug reported: http://bugs.mysql.com/bug.php?id=20710 ?

It happens I have version 4.1.20. How can I walkover this without upgrading mysql?
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
... it seems the database restore breaks with the error at the Links_Word_List table
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

Did you compress(.zip or .gz) your mysql dump file before moving? I had a similar error when moving database with accent chars(German) without compressing.

Hope that helps.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
Hi,

You could just try doing it with the core tables:

mysqldump --add-drop-table -u=USERNAME -pPASSWORD DATABASE_NAME glinks_CatLinks glinks_Category glinks_Links > backup.sql

....assuming the bits in red are the only main tables you want to extract.

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] Moving to new server instructions In reply to
OK, I skipped the table that was giving the error and the database restored correctly.

Then I copied all files exactly (same owner and permissions) and created a symbolic link (ln -s) to have the same path. It seems things are working OK. Do you think I should run into problems later because the real path is not the same? Shall I run setup to set the new paths or I will have more problems?
Quote Reply
Re: [Taki-x] Moving to new server instructions In reply to
symlinking things should be fine.

For your database, you'll want to switch your Links table's indexing scheme to something else, Rebuild Search, switch it back and Rebuild Search again. This will ensure that the table that you didn't import is re-created properly.

Adrian