Server migration

Having trouble installing serendipity?
Post Reply
kalos
Regular
Posts: 11
Joined: Tue Nov 18, 2008 1:32 am

Server migration

Post by kalos »

Hello all,

I'm switching my blog from a hosted environment (CentOS with cPanel) to my own colo. Is there a preferred method of migrating s9y? Is it easiest to do a database dump, perform a clean installation of the same version, and import the database dump? Will that work, or is there a better method of migrating?



Thank you preemptively.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Server migration

Post by garvinhicking »

Hi!

Kind of: DB dump, search&replace inside the dump for pathname replacement-dump import. No clean install needed. Also check the FAQ on s9y.org!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
kalos
Regular
Posts: 11
Joined: Tue Nov 18, 2008 1:32 am

Re: Server migration

Post by kalos »

Hello Garvin,

Thanks for the link to that doc; I'm sure it will prove to be quite useful! Two more quick questions:

1) I am coming from a server that had cPanel to one that does not. CPanel named my s9y databases as blog_whatever, because blog was my username on that server. I would like to keep things consistent and have my username on this new server as the prefix. Should I search for blog_ in the SQL dump, and replace it with my username on this new server (e.g. $NEWUSER_database)? Will this cause any problems with the import? Is there a better way?

2) I see in the FAQ that you sent me that I can change the path of my blog as well. Currently (on the old server), it sits at domain.tld/blog/. I would like to put it at the root, so it shows up at domain.tld. I assume that I can do so at the same time that I make these other changes.


Thanks again for such an awesome product!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Server migration

Post by garvinhicking »

Hi!

To change the new credentials is very simple. Those are not stored in the database, but inside your "serendipity_config_local.inc.php" file. You can change it to what you named your DB there easily.

You can do the change from /blog/ to / - but you should use Search & Replace on the SQL-Dump to replace the string "/blog/" to "/", which should do the trick for all links etc. It's good to do that in one go, yes!

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply