Migration tool for Serendipity -> Serendipity

Having trouble installing serendipity?
Post Reply
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Migration tool for Serendipity -> Serendipity

Post by hgoor »

Ok, so when you install Serendipity, there are lots of ways you can migrate from another blog-system. For instance from Blogger to Serendipity.

But here is my problem: I want to migrate from Serendipity on Windows to Serendipity on Linux :lol:

It would be nice if there was a way that would just import my settings and most important: all my blogs!

Now, I know I can do a database dump and probably import that, but what about all the problems with links, using / and \ etc. etc. ?

Does anyone have any experience with this or can help me with it?
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Actually, migrating from Serendipity to Serendipity is covered in the FAQ: http://s9y.org/11.html#A21.

However, the Windows -> Linux thing can be an interesting experience.

Most of what Serendipity does is HTML/HTTP, which has standardized on the forward-slash (/) for all operating systems. So images, links, embedded content, and anything else that a remote system has to access from your server should pose no problems.

Paths in the Serendipity code shouldn't pose any problem, either. PHP uses forward-slashes in its paths, too. The PHP is interpreted through the web server, though, so that may cause some trouble. Apache will take forward-slash and backslash interchangeably, so if you're using Apache on either server, you should be good to go.

The only likely problem is in the php.ini file. That uses an include_path variable that may be interpreted by the operating system. That's a server setup issue, though.

Of course, you could check your serendipity_config_local.php and change all the paths there to use forward-slash. There shouldn't be anything in it that references a drive letter.

Finally, if you've done something silly in any of your entries, like including a drive letter in a link, you should modify that by hand. You can do it directly in the database dump, since that should make it easier to find all instances.

And if you have any trouble, we'll still be here to help.
Judebert
---
Website | Wishlist | PayPal
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

Heh, well I guess it will be a trial and error operation :-)

I upgraded fron various version of Serendipity before, but that was always a breeze and on the same platform. However I am less and less happy with Windows and just feel that Linux would be better in terms of performance and security.

I guess I will have to copy all images that I use in my blogs and make sure that any urls that refer to other stuff in my blog will have to be checked..

Going straight into the database is far beyond my skills.... So I guess I will need to check over 300 articles myself :cry:
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

It may not be so far above your skills as you believe.

First off, there's likely nothing in there to cause a problem. Since your users are trying to get stuff off of your server, not their local box, and drive letters are references to a local resource, entries generally don't have drive letters. The only exceptions I can think of are cracking (where you're trying to access the user's local box) and a single-user webserver designed only for the local user's use. (For that, you'd think the sysop would do something a little more... useful.)

But you can still search, just to make sure. You already know how to make a database dump, since you've done that before. The result is just a big text file, sometimes compressed. Uncompress it, and you get a really big text file. Open it in your favorite text editor -- not Word or WordPad -- and do a search for "C:\". (Really good text editors, like Vim, let you search for regular expressions, so you could look for all drive letters at one time: "[a-z][A-Z]:\".)

Betcha don't find any. And it'll be a lot easier than opening all 300 entries in the admin page.
Judebert
---
Website | Wishlist | PayPal
hgoor
Regular
Posts: 297
Joined: Thu Jan 06, 2005 11:46 am

Post by hgoor »

Hmmm, I think I have to start over and try all the migration again anyway..

I installed 1.1 on my linux machine and then imported from a 1.0 database..

Off course all screwed up. Also some plugings seem missing...

Also I'm a bit confused about all the CHMOD and rights stuff (Jeezz, why is XP so much easier??)

Anyway: thanks so far on all the advise!
"If life is worth living, it's worth documenting" -- Adam Curry ("Podfather")

Bloggers@large: http://www.vandegoor.com
iLounge Radio: http://www.hostingperfect.net:8004/listen.pls
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

As mentioned in the FAQ, when you migrate a server you should always migrate to the version your database is running as/under!

So, first copy over a 1.0 installation and only after that you do the DB update!

You can force this behaviour if the milk was already spilt: Just edit your serendipity_config_local.inc.php file and set the versionInstalled string to "1.0". This will then upgrade your 1.0 database to a 1.1 one.

BTW, actually I always suggest Windows people to use "/" forward slash notations. PHP properly accepts "C:/Windows/Bla" as paths, so this is the easiest way to be compatible to linux anytime. :)

Thanks a lot to Judebert for pointing out so much else important stuff!

HTH,
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