Moving a WordPress weblog
May 25, 2006
From Weiqei Gao’s blog…
I haven’t done too much with the WordPress blog I created 122 days ago. But instead of throwing it away, I thought it a good opportunity to test how easy it is to move the blog over.
It indeed it easy. All I have to do is to move the MySQL database and the /var/www/html/wordpress directory from one computer to another:
[root@gao-2004] # mysqladmin -p –add-drop-tables wordpress > /mnt1/wordpress.mysqldump
[root@gao-2004] # cd /var/www/html
[root@gao-2004] # tar cf /mnt1/wordpress-files.tar wordpress
[root@gao-2006] # mysqladmin -p create wordpress
[root@gao-2006] # mysql -p wordpress grant usage on *.* to weiqi identified by password
> grant delete, select, insert, update on wordpress.* to weiqi
[root@gao-2006] # cd /var/www/html
[root@gao-2006] # tar xf /mnt1/wordpress-files.tar
where weiqi/password is the username/password pair I gave to WordPress when I did the five minutes install back then.
Moving a Subversion repository
May 25, 2006
From Weiqei Gao’s blog
I hosted my Subversion repository on gao-2004, and needed to move it to gao-2006. With the default backend storage system change (from Berkeley db based to file system based) for Subversion that happen between FC3 and FC4, I expected that I need to at least read a lot of documentation and perform a fair amount of experimentation.
It turn out that that is not the case, for two reasons. One, the backend storage system is an implementation detail of Subversion and is mostly hidden behind the Subversion user interface. The detail leaked through only in terms file permission problems. BTW, Pragmatic Version Control Using Subversion helped a lot in the process, even though one of its recipes no longer applies in the fsfs world.
Here’s my migration steps:
[root@gao-2004] $ svnadmin dump /var/svnroot > /mnt1/svn-repo.svndump
[root@gao-2006] # svnadmin create /var/svnroot
[root@gao-2006] # chown -R weiqi.svn /var/svnroot
[root@gao-2006] # svnadmin load /var/svnroot