[Moin-user] Success: Upgrading from 1.2.x to 1.3.x on Mac OS X
Yusuf Abdulghani
yaghani at mac.com
Sun Feb 6 13:30:34 EST 2005
Hi,
There has been quite a few mail in the last few days on this list about
good documentation (README.migration) for successfully upgrading the
wiki from version 1.2.x to 1.3.x. Initially, when I started the
migration procress, I had trouble. However, after *reading* the
documentation and the comments on this list, I was able to successfully
migrate to the new wiki. Here are my notes on the migration process.
System: Mac OS X
Migration: 1.2.x to 1.3.x
Steps to migrate:
0. Stop the wiki: To stop the wiki, I modified my /etc/httpd/httpd.conf
directory and commented out the lines
#Alias /wiki "/full/path/to/moin/htdocs"
#ScriptAlias /mywikiname "/full/path/to/mywikiname/moin.cgi"
To finally stop the wiki, I ran the following command:
> apachectl graceful
1. Backup: I backed up my "MoinMoin" (code) directory as well as my
data directory using the "tar" command.
> cd /directory/containingMoinMoin/
> tar -cjvf backup-MoinMoin.tar.bz2 MoinMoin
> cd /directory/containing_mywikiname/
> tar -cjvf backup-mywikiname.tar.bz2 mywikiname
Since now I have the full backup in tarball, I deleted (or moved to a
different location) both the "MoinMoin" directory (code) and
"mywikiname" (data) directory. I did this so that I will have a *clean*
installation.
2. Installing MoinMoin
This was very easy. I just followed the instructions for installing the
wiki in the INSTALL.html. Essentially, I did the following:
> cd ~/Desktop
> tar -xzf moin-1.3.3.tar.gz
> sudo -s
> cd moin-1.3.3
> python setup.py install --install-data='/usr/local'
Note that for some reason, if you stop the install process by pressing
Cntrl-C, you should delete the moin-1.3.3 directory and untar the
tarball (moin-1.3.3.tar.gz) again before running the "python setup.py
install" command again.
> cd $HOME
> mv mywikiname old_mywikiname <-- move my originial wiki to a
different directory
> mkdir my_test_wiki <-- create a test wiki directory
> cp -r /usr/local/share/moin/data my_test_wiki
> cp -r /usr/local/share/moin/underlay my_test_wiki
> cp -r /usr/local/share/moin/server/moin.cgi my_test_wiki
> cp -r /usr/local/share/moin/config/wikiconfig.py my_test_wiki
Now set correct permissions to these directories that you just copied
to my_test_wiki
> chown -R www:www my_test_wiki
> chmod -R ug+rwX my_test_wiki
> chmod -R o-rwx my_test_wiki
This step of setting up correct permissions is very important. During
the installation process, whenever you make changes to your wiki
directory, make sure to run the above commands so that the permissions
are reset as above.
Now start the wiki by editing the /etc/httpd/httpd.conf file:
Alias /wiki "/full/path/to/moin/htdocs"
ScriptAlias /mywikiname "/full/path/to/my_test_wiki/moin.cgi"
Save the httpd.conf file and run the following command:
> apachectl graceful
This should complete the installation of your new wiki. Make sure that
you can see the FrontPage and navigate through the HelpPages of the new
wiki. Once these things are working with the new wiki, you are all set
to do the most important thing; i.e. migrating your data from 1.2.x to
1.3.x.
3. Migrating Data.
The README.migration is very useful. To migrate the data, here is what
I did:
> cd /full/path/to/MoinMoin/scripts/migration/
> ls
You should see all the migration scripts
Now copy the data directory from "old_mywikiname" directory to this
directory and run the migration scripts as follows:
> sudo -s
> cp -r /full/path/to/old_mywikiname/data .
> python 12_to_13_mig1.py
> ls
> python 12_to_13_mig2.py
> ls
> python 12_to_13_mig3.py
> ls
> python 12_to_13_mig4.py
> ls
> python 12_to_13_mig5.py
> ls
> python 12_to_13_mig6.py
> ls
> python 12_to_13_mig7.py
> ls
> python 12_to_13_mig8.py
> ls
> python 12_to_13_mig9.py
The "ls" command should show you the new directories that are created
at the end of running each script. At the end of running all the
scripts, your directory should look like this:
> ls
12_to_13_mig1.py 12_to_13_mig6.pyc data.pre-mig2
12_to_13_mig1.pyc 12_to_13_mig7.py data.pre-mig3
12_to_13_mig2.py 12_to_13_mig7.pyc data.pre-mig4
12_to_13_mig2.pyc 12_to_13_mig8.py data.pre-mig5
12_to_13_mig3.py 12_to_13_mig8.pyc data.pre-mig6
12_to_13_mig3.pyc 12_to_13_mig9.py data.pre-mig7
12_to_13_mig4.py 12_to_13_mig9.pyc data.pre-mig8
12_to_13_mig4.pyc __init__.py data.pre-mig9
12_to_13_mig5.py __init__.pyc migutil.py
12_to_13_mig5.pyc data migutil.pyc
12_to_13_mig6.py data.pre-mig1
Now the "data" directory contains your data configured for the new wiki
format. Copy or move this data directory to your my_test_wiki directory
as follows:
> cd /full/path/to/my_test_wiki
> rm -r data/
> cp -r /full/path/to/MoinMoin/scripts/migration/data .
> cp /usr/local/share/moin/data/plugin/__init__.py data/plugin/
> cd ..
> chown -R www:www my_test_wiki
> chmod -R ug+rwX my_test_wiki
> chmod -R o-rwx my_test_wiki
The last few commands of setting appropriate permissions is very
important.
As soon as you do this, your wiki data migration is complete.
Now go you the web browser and type one of the wiki names which existed
in your original wiki. The page should automatically show up.
4. Configuring your "wikiconfig.py"
Look at your "moin_config.py" from previous installation and
appropriate set up the fields in "wikiconfig.py"
5. Going live!
Once you have tested your migration and everything seems to work fine,
mv the "my_test_wiki" to the actual wiki name and go live as follows:
> mv my_test_wiki mywikiname
> chown -R www:www mywikiname
> chmod -R ug+rwX mywikiname
> chmod -R o-rwx mywikiname
> vi /etc/httpd/httpd.conf
Alias /wiki "/full/path/to/moin/htdocs"
ScriptAlias /mywikiname "/full/path/to/mywikiname/moin.cgi"
> apachectl graceful
This should take your new migrated wiki live!
MoinMoin Developers: Thanks for the good work with MoinMoin. You guys
have done a wonderful job.
BTW, we are using MoinMoin internally for our group here at Apple,
Cupertino. Note that several other groups at Apple use other flavors of
wiki. But I have chosen to use MoinMoin because of less clutter and
ease of maintenance. The "Modern" theme for 1.3.x is much better than
1.2.x. I hope that the more plugins are written for MoinMoin which
allows us to incorporate Charts (gdchart is currently not ported to
OSX), ActionItemsTracker, ShadedTables, etc.
Yusuf
More information about the Moin-user
mailing list