I have got hold of a new, shorter domain name and plan to migrate my existing StatusNet installation to it. My current plan for the migration is follows:
1. Copy all of the files from the old site to the new site.
2. Global search and replace across these files of oldsiteurl with newsiteurl
3. mysqldump the current database
4. Global search and replace in dumped sql file of oldsiteurl with newsiteurl
5. Create new blank database on new site
6. Create db user with same username and password as admin on the old site's db.
7. Load in the dumped sql using mysql commandline
8. Try the new site!
Does this seem reasonable? Are there any traps here? The main issue I have thought of is that remote subscriptions to my new site will not carry across. There shouldn't be too many of these, so I'm not very worried about that.
Thoughts, advice?
Comments
a small point though - 7b. Change new database settings in the config file
good luck & let us know how it goes.. :)
as well as a script to update profiles, ostatus subscribers.. not certain that will all work perfectly across domains.. i think there will be at least one gotcha.
* As a precaution, in case the DB schema had changed, I ran a modified version of rebuilddb.sh which didn't dump the DB on the new site, but ran statusnet.sql and then imported my old site's db. There are are a number of tables which are created by plugins so they do not appear in statusnet.sql, this created problems for the script when it tried to insert the old data into tables that didn't exist, so fudged by creating the tables. They were hubsub, ostatus_profile, ostatus_source, rsscloud_subscription, user_flag_profile, user_openid_trustroot, magicsig.sql, ostatusprofile, registration_ip and user_openid.
* Somehow or other, I managed to get the new domain appearing in the file table as a url, so when I did a global replace of old domain => new domain in the sql file, I ended up with two duplicate urls in the file data, which meant the inserts failed because of a key violation. I fudged by changing on to new domain/index.php
* I had to update the keys for the Recaptcha plugin for the new site.
* I created new Facebook and Twitter apps (easier for testing than just repointing the old apps to the new domain).
So, I think I am just about ready to put a redirect in the old site's .htaccess file!
Posting messages resulted in an error for accounts with remote subs and I couldn't find a script to fix it (not sure if it's possible anyway), so for now I just deleted the rows from hubsub. There weren't many anyway.