Forum OpenACS Q&A: My experience upgrading from OpenACS 4.6.3 to 5.2.3
When upgrading, make backups of the db and filesystem as you reach significant points in the upgrade.
Take note of what software is required as you upgrade (AOLServer 4.0 and Postgres 7.2 will allow you to upgrade from OpenACS 4.6.3 to 5.2.3):
The upgrade from OpenACS 4.6.3 to 5.0.3 is reasonably well documented:
A couple of threads also help:
#I had to delete some duplicate files:
#I dropped no longer used file-related data :
psql -c "drop table apm_package_file_types"
#And update some kernel parameters to allow url posting:
Site-Wide Administration -> Kernel Parameters -> Antispam -> AllowedAttribute
Add href (to src and target)
After upgrading to OpenACS 5.0.3, templating upgrades had broke the appearance of some of the pages (comment/forum posting). In most cases this was fixed by my later upgrade to 5.2.3 (except for the Directory).
I then updated my OpenACS 5.0.3 sites to 5.2.3.
I installed the 5.2.3 updates from the OpenACS Repository. This was done by altering the install URL to allow me to install the kernel files: "acs-admin/install/install?repository".
Is there a standard way of upgrading OpenACS 5.n to 5.n+1 via the repository?
When upgrading the ACS Messaging to 5.2.3 I had problems with old acs_message_revisions that had parent_id=0, I manually altered that to parent_id=-4:
#The specific scripts reporting errors were packages/acs-messaging/sql/postgresql/upgrade/upgrade-5.1.0d1-5.1.0d2.sql and
update cr_items set parent_id=-4 where parent_id=0 and content_type='acs_message_revision' and storage_area_key ='CR_FILES';
When upgrading the Content Repository to 5.2.3 I had problems with pre-existing functions.
#Try to upgrade content repository packages from remote files (it will fail)
#fix the problems in the files you have downloaded locally:
perl -pi -e "s/create function/create or replace function/g" packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.1.0d2*.sql
#Comment out includes from line 88 onwards:
#Upgrade content repository packages from locally downloaded files
After upgrading to OpenACS 5.2.3, I discovered that the upgraded general-comments module allowed anonymous posting (I saw 1600 automated spam posts). To fix this I altered the comment-add.tcl files to require login:
#add "set user_id [auth::require_login]" to the top of the contract function:
In the upgraded forum module I also found that older forum posts weren't listing authors. I fixed this with some SQL:
update forums_messages set last_poster=user_id where last_poster is null and parent_id is null and posting_date =last_child_post;
The upgraded directory had problems with templating on the index page. I added ";noquote" after search_vars, alpha_nav_bar, row_range_html, name_header
Hopefully this will help someone, or inform me as to how I _should_ have performed the upgrade.
You should be able to upgrade directly frm 4.6.3 to 5.2.3, but you might have ended up with some of the same problems.
In some cases, a problem with an upgrade script might have been fixed in a newer version.
Regarding upgrade from repository, you are correct. You can only upgrade minor versions from the repository without changing the repository URL. It looks like it pretty much worked.
Thanks for persevering. I think the upgrades are generally more reliable in newer versions, but it is not a well tested feature. It's very difficult to test it reliably without using real data.
Can I ask why you stopped at 5.2.3 and didn't take the current version?
"I stopped upgrading at OpenACS 5.2.3 as I am using Postgresql 7.4"
I used Postgresql 7.3 on the old server to move from OpenACS 4.6.3 to 5.2.3 and then moved the code and database to the new server running Postgresql 7.4. Is there a page summarising the improvements in the different versions?
According to the compatibility matrix ( http://openacs.org/xowiki/openacs-compatibility-matrix ) to upgrade from OpenACS 4.5, you first need to run Postresql 7.2 to upgrade to OpenACS 4.6.3, and then
run Postgresql 7.3 to upgrade from OpenACS 4.6.3 to OpenACS 5.2.x. And then Postgresql 8.x to upgrade beyond that.
I actually couldn't find the release notes describing the changes between each OpenACS release, but I'm sure they're here on the website somewhere.
I agree with Don that the later you go the easier it gets. I had to tweak a few sql upgrade files (some I checked in, some were local tweaks).
But after a few hours effort, thanks to some forum threads (same ones posted above). It worked perfectly.
I was (and still am to a lesser extent) using some old non-standard lars-* packages and some personal hacks which were easy to re-implement on the latest oacs.
I think that's pretty amazing - upgrading 6 years of core changes in a few hours - and shows the discpline in the oacs core team given to upgradability.