cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade Documentation

rkramedjian
Champ on-the-rise
Champ on-the-rise
Would it be possible to get you folks to upgrade the documentation on upgrading Alfresco Community?  I just finished an upgrade from 4.0.c to 4.0.d.  Following your instructions I backed up Alf_Data.  I did my upgrade and verified the install.  Then I restored the Alf_Data directory.  This is where the wheels came off.

1.  Instead of using data_root in PostgreSQL.conf someone used a specific directory.  Since that directory had a root of Alfresco-4.0.c PostgreSQL would not start.  After digging thru all of the PostgreSQL related files I found the only place this entry was used and corrected it.

2.  Somehow or other the solr install is putting all of the solr jar files in the alf_data path and I had to copy the 4.0.d solr directory over the one that I backed up to get solr to stop recreating and using the Alfresco-4.0.c/Alf_Data/Solr directory.  Even correcting the solrcore.properties file directory parameter did not fix the problem.  So it seems that the directory is hard coded into one of the jar files.  I'm not a Java programer yet so I'm not digging into the code to figure out where the error is.

OK, I have shot the obvious problems so my question back to you folks is what do you already know about that I have missed and that your documentation does not address?

Next you talk about backed up configuration override settings other than the entries that I've had to make in the general.properties file what else do I need to worry about?

How do I force a full reindex?

Ron
4 REPLIES 4

michaelk
Champ in-the-making
Champ in-the-making
Upgrading in Alfresco has always been incredibly fragile and causes grief in most cases. (IMHO)

Upgrading 4.0.x to 4.0.x+1 seems to involve ….. (for me)

1. Keeping the old installation intact (I'm using the supplied postgresql and not my own database. Had I used MySQL (as I've done in the past) I would back that up).
2. Installing the new version (using the same admin password as the old)
3. Edit tomcat/conf/server.xml and tomcat/shared/classes/alfresco-global.properties (as appropriate)
4. start the new version (monitoring the alfreso log…  $ tail -f alfresco.log)
5. stop alfresco
6. move the 'post-natal' data directory for safe keeping. $ mv alf_data alf_data.post-natal
7. copy the alf_data from the previous installation …. $ cp -a ../alfresco-4.0.c/alf_data .
8. remove the old solr directory and replace it with the 'post-natal version'. $ rm -rf alf_data/solr; cp -a alf_data.post-natal/solr alf_data/solr
9. edit alf_data/postgresql/postgresql.conf and alf_data/postgresql/posmaster.opts to correct path: unix_socket_directory = '/var/home/loc/alfresco-4.0.d/postgresql'
10. start the new version (monitoring the alfreso log…  $ tail -f alfresco.log)

Solr will rebuild the indexes (although it's a slow process .. so be patient)

Obviously this is for Linux …

My installation runs on a server and has no graphical display.  With no X software installed, the supplied openoffice does not run. I must copy some X libraries to the openoffice directory to get alfresco's openoffice to work. cp -a ~/Downloads/{libX11-xcb.so.1,libX11-xcb.so.1.0.0,libX11.so.6,libX11.so.6.3.0,libXext.so.6,libXext.so.6.4.0,libxcb.so.1} openoffice/program/
Also the path to the openoffice control script in the alfresco.sh script is wrong, and this needs to be edited to start openoffice on Linux.

rkramedjian
Champ on-the-rise
Champ on-the-rise
Michael,

Thank you that gives me a good upgrade template.  I am running on a Mac Mini with Lion 10.7.3 and before the upgrade from 4.0.c the installation was running basically error free.

After the upgrade I have two problems.  If you or anyone else has some hints that will help me to address the issue that would be great.

Ron

1st I am getting a error in the log related to Solr as follows ….

00:00:00,016 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean#60328c40 threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'run' on target class [class org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor] failed; nested exception is org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 020412396 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
   at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:563)
Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 020412396 Request failed 404 /solr/alfresco/alfresco?q=%2B+TYPE%3A%22ws%3AwebassetCollection%22+%2B+%40ws%5C%3AisDynamic%3Atrue&wt=json&fl=*%2Cscore&rows=2147483647&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
   at org.alfresco.repo.search.impl.solr.SolrQueryHTTPClient.executeQuery(SolrQueryHTTPClient.java:333)
   at org.alfresco.repo.search.impl.solr.SolrQueryLanguage.executeQuery(SolrQueryLanguage.java:49)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:348)
   at org.alfresco.repo.search.impl.solr.SolrSearchService.query(SolrSearchService.java:152)
   at org.alfresco.repo.search.SearcherComponent.query(SearcherComponent.java:67)
   at org.alfresco.repo.search.AbstractSearcherComponent.query(AbstractSearcherComponent.java:53)
   at sun.reflect.GeneratedMethodAccessor563.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy13.query(Unknown Source)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1$1.execute(DynamicCollectionProcessor.java:114)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:259)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor$1.doWork(DynamicCollectionProcessor.java:107)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
   at org.alfresco.module.org_alfresco_module_wcmquickstart.jobs.DynamicCollectionProcessor.run(DynamicCollectionProcessor.java:102)
   at sun.reflect.GeneratedMethodAccessor579.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
   at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
   … 3 more

The 2nd error comes up on my share dashboard and its contents are ….

An error has occured in the Share component: /share/service/components/dashlets/my-docs-editing.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 02060002 Failed to process template org/alfresco/components/dashlets/my-docs-editing.get.html.ftl
Server: Alfresco Spring WebScripts - v1.0.0 (Release 958) schema 1,000
Time: Mar 6, 2012 10:56:23 AM
Click here to view full technical information on the error.
Exception: freemarker.core.InvalidReferenceException - Expression content.blogPosts is undefined on line 99, column 9 in org/alfresco/components/dashlets/my-docs-editing.get.html.ftl.
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
freemarker.core.BuiltIn$sizeBI._getAsTemplateModel(BuiltIn.java:691)
freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
freemarker.core.ComparisonExpression.isTrue(ComparisonExpression.java:111)
freemarker.core.IfBlock.accept(IfBlock.java:80)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.process(Environment.java:199)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:779)
org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:70)
org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:239)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:372)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.WebScriptProcessor.executeBody(WebScriptProcessor.java:311)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
org.springframework.extensions.surf.render.RenderService.process(RenderService.java:600)
org.springframework.extensions.surf.render.RenderService.renderSubComponent(RenderService.java:506)
org.springframework.extensions.surf.render.RenderService.renderChromeInclude(RenderService.java:1296)
org.springframework.extensions.webscripts.ChromeIncludeFreeMarkerDirective.execute(ChromeIncludeFreeMarkerDirective.java:81)
freemarker.core.Environment.visit(Environment.java:274)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.process(Environment.java:199)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:455)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
org.springframework.extensions.surf.render.RenderService.processRenderable(RenderService.java:204)
org.springframework.extensions.surf.render.bean.ChromeRenderer.body(ChromeRenderer.java:95)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.bean.ChromeRenderer.render(ChromeRenderer.java:86)
org.springframework.extensions.surf.render.RenderService.processComponent(RenderService.java:433)
org.springframework.extensions.surf.render.bean.ComponentRenderer.body(ComponentRenderer.java:94)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.RenderService.renderComponent(RenderService.java:962)
org.springframework.extensions.surf.render.RenderService.renderRegionComponents(RenderService.java:901)
org.springframework.extensions.surf.render.RenderService.renderChromeInclude(RenderService.java:1275)
org.springframework.extensions.webscripts.ChromeIncludeFreeMarkerDirective.execute(ChromeIncludeFreeMarkerDirective.java:81)
freemarker.core.Environment.visit(Environment.java:274)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.process(Environment.java:199)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:455)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
org.springframework.extensions.surf.render.RenderService.processRenderable(RenderService.java:204)
org.springframework.extensions.surf.render.bean.ChromeRenderer.body(ChromeRenderer.java:95)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.bean.ChromeRenderer.render(ChromeRenderer.java:86)
org.springframework.extensions.surf.render.bean.RegionRenderer.body(RegionRenderer.java:99)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.RenderService.renderRegion(RenderService.java:852)
org.springframework.extensions.surf.extensibility.impl.RegionDirectiveData.render(RegionDirectiveData.java:90)
org.springframework.extensions.surf.extensibility.impl.ExtensibilityModelImpl.merge(ExtensibilityModelImpl.java:319)
org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.merge(AbstractExtensibilityDirective.java:177)
org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:145)
freemarker.core.Environment.visit(Environment.java:274)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:126)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:428)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:428)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Macro$Context.runMacro(Macro.java:172)
freemarker.core.Environment.visit(Environment.java:614)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Macro$Context.runMacro(Macro.java:172)
freemarker.core.Environment.visit(Environment.java:614)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.visit(Environment.java:406)
freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Macro$Context.runMacro(Macro.java:172)
freemarker.core.Environment.visit(Environment.java:614)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.process(Environment.java:199)
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:171)
org.springframework.extensions.webscripts.WebTemplateProcessor.executeBody(WebTemplateProcessor.java:455)
org.springframework.extensions.surf.render.AbstractProcessor.execute(AbstractProcessor.java:57)
org.springframework.extensions.surf.render.RenderService.processTemplate(RenderService.java:722)
org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer.body(TemplateInstanceRenderer.java:123)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.bean.PageRenderer.body(PageRenderer.java:85)
org.springframework.extensions.surf.render.AbstractRenderer.render(AbstractRenderer.java:77)
org.springframework.extensions.surf.render.RenderService.renderPage(RenderService.java:763)
org.springframework.extensions.surf.mvc.PageView.dispatchPage(PageView.java:419)
org.springframework.extensions.surf.mvc.PageView.renderView(PageView.java:314)
org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:316)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:307)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:680)
Exception: org.springframework.extensions.webscripts.WebScriptException - 02060002 Failed to process template org/alfresco/components/dashlets/my-docs-editing.get.html.ftl
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor.process(FTLTemplateProcessor.java:175)

rkramedjian
Champ on-the-rise
Champ on-the-rise
Michael,

Wow saying that upgrading is delicate is an understatement. :shock:

I still have issues but the main work has been accomplished.

Thank you so much for your help.

Ron

xarope
Champ in-the-making
Champ in-the-making
just to chip in here, I've been trying to do an upgrade from 4.0.b to 4.0.d several times now, and finally managed to nail it:

My setup:
ubuntu 10.04 with postgresql 9.1 (using pitti PPA)
alfresco installed in /opt/alfresco (linked to /opt/alfresco-4.0.b), so I can configure things to point to /opt/alfresco and link/unlink when new versions are installed.
my production cluster uses different filesystems and SAN/NAS(NFS) systems for various directories namely the content store on NFS, and the SOLR indexes on local disks, with the postgresql database on a separate database server (the "simple" cluster model as explained in the alfresco wiki documentation), so I have to "mirror" and move various directories to different locations, like this:

dir.root=/opt/alf_data
=> required change in /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
(basically I just moved /opt/alfresco/alf_data to /opt/alf_data; this is to setup a separate and isolated content store from the application installation directory, and ensure no overwrites on subsequent installs)

dir.keystore=/opt/alf_keystore
=> required change in /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
=> required change in /opt/alfresco/tomcat/conf/server.xml
(basically I moved /opt/alfresco/alf_data/keystore to /opt/alf_keystore)

data.dir.root=/opt/alf_solr
=>required change in /opt/alf_solr/archive-SpacesStore/conf/solrcore.properties
=>required change in /opt/alf_solr/workspace-SpacesStore/conf/solrcore.properties
=> required change in /opt/alfresco/tomcat/conf/Catalina/localhost/solr.xml
(basically I moved /opt/alfresco/alf_data/solr to /opt/alf_solr; this is again to setup a separate and isolated index store from the application installation directory)

Finally, since this is an enterprise deployment, I have AD authentication to 3 different AD domains
=> required change in /opt/alfresco/tomcat/shared/classes/alfresco-global.properties
=> also required new subdirectories /opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap[123]/ and associated ldap-ad-authentication.properties file(s)
(those not used to unix regexp, the ldap[123] basically means I have three subdirectories ldap1, ldap2 and ldap3, to hold the different ldap-ad-authentication properties files which have the details for the three different AD servers)

So, what I did for the upgrade (final version, no errors in either alfresco startup, or solr execution):
1) stop alfresco

2) create a copy of the existing database (in case I need to rollback)
In production I would have backed up the database; in test/dev, I can afford to copy the database (makes it easy for me to rollback), so since I am using postgres and my existing database is called alfresco_cluster, su - postgres and run "createdb alfresco_cluster2 -O alfresco_c  -T alfresco_cluster".
Henceforth I will use alfresco_cluster2 as the new DB

3) install alfresco 4.0.d, making sure to not install postgres, and use the new database from above
e.g. this is my test install, so
a) [jdbcSmiley Tongueostgresql://localhost/alfresco]: jdbcSmiley Tongueostgresql://localhost/alfresco_cluster2
b) Database name: [alfresco]: alfresco_cluster2
if I was doing this in production, my JDBC URL would look like jdbcSmiley Tongueostgresql://serverSmiley Tongueort/alfresco_cluster2

4) VERY IMPORTANT: at the end of the install, DO NOT start alfresco, i.e.
Launch Alfresco Community Share [Y/n]: N

5) now I need to redo my customizations; I chose to redo rather than copy the files over, so I could also manually check if 4.0.d has any new parameters in the config files I change.

a) relink /opt/alfresco to /opt/alfresco-4.0.d

b) I am of course keeping my previous /opt/alf_data content store directory, so I basically ignore the new /opt/alfresco/alf_data directory (except the solr directory, see later), and edit alfresco/tomcat/shared/classes/alfresco-global.properties to change dir.root (and others, see below)

c) as per above, I am reusing my old keystore, so edit both /opt/alfresco/tomcat/shared/classes/alfresco-global.properties and /opt/alfresco/tomcat/conf/server.xml to reflect the keystore change

d) for solr, I found out that there are some changes in solr in 4.0.d compared to 4.0.b, so if I reused the old solr store, even though I forced solr to rebuild the indexes by deleting /opt/alf_solr/workspace and /opt/alf_solr/archive, I would get errors in catalina.out like:
"SEVERE: org.alfresco.repo.search.impl.parsers.FTSQueryException: 03260000 line 1:97
mismatched input '.000' expecting TO  ([@11,97:100='.000',<62>,1:97])
"
So I deleted (backed up) my old /opt/alf_solr directory, then moved /opt/alfresco/alf_data/solr to /opt/alf_solr, and as with above, edit the following files to reflect the change in directory for data.dir.root:
i) /opt/alf_solr/archive-SpacesStore/conf/solrcore.properties
ii) /opt/alf_solr/workspace-SpacesStore/conf/solrcore.properties
iii) /opt/alfresco/tomcat/conf/Catalina/localhost/solr.xml

e) for my AD authentication to 3 different AD domains
I just copied the previous /opt/alfresco-4.0.b/tomcat/shared/classes/alfresco/extension/subsystems/Authentication/ldap-ad/ldap[123]/ and associated ldap-ad-authentication.properties file(s) over to the new /opt/alfresco/… directories

Now, you can finally start alfresco, and check your /opt/alfresco/tomcat/logs/catalina.out and fingers crossed, like me, you won't have any errors related to the upgrade.  Hope this helps!