Wiki source code of Unix Merge Configuration Files

Last modified by superadmin on 2026/11/25 21:35

Show last authors
1 The commands below use standard Unix tools when [[upgrading an XWiki distribution using the ZIP package>>documentation.xs.admin.upgrade.distribution.upgrade-zip-package.WebHome]] on a Unix system, assuming ##xwiki.new## is the directory of the new installation and ##xwiki## the directory of the previous one.
2
3 == Back Up the New Files ==
4
5 Each configuration file of the new installation — ##web.xml##, ##xwiki.cfg##, ##xwiki.properties##, ##struts-config.xml## and ##logback.xml## — is first moved aside under an ##.ori## extension, so that the merge can write the result back under the original name:
6
7 {{code language="bash"}}
8 mv xwiki.new/WEB-INF/web.xml xwiki.new/WEB-INF/web.xml.ori
9 mv xwiki.new/WEB-INF/xwiki.cfg xwiki.new/WEB-INF/xwiki.cfg.ori
10 mv xwiki.new/WEB-INF/xwiki.properties xwiki.new/WEB-INF/xwiki.properties.ori
11 mv xwiki.new/WEB-INF/struts-config.xml xwiki.new/WEB-INF/struts-config.xml.ori
12 mv xwiki.new/WEB-INF/classes/logback.xml xwiki.new/WEB-INF/classes/logback.xml.ori
13 {{/code}}
14
15 == Merge with sdiff ==
16
17 ##sdiff## then compares the file from the old installation with the backup of the new one and writes the merged result into the new installation:
18
19 {{code language="bash"}}
20 sudo sdiff xwiki/WEB-INF/web.xml xwiki.new/WEB-INF/web.xml.ori -B -W -E -o xwiki.new/WEB-INF/web.xml
21 sudo sdiff xwiki/WEB-INF/xwiki.cfg xwiki.new/WEB-INF/xwiki.cfg.ori -B -W -E -o xwiki.new/WEB-INF/xwiki.cfg
22 sudo sdiff xwiki/WEB-INF/xwiki.properties xwiki.new/WEB-INF/xwiki.properties.ori -B -W -E -o xwiki.new/WEB-INF/xwiki.properties
23 sudo sdiff xwiki/WEB-INF/struts-config.xml xwiki.new/WEB-INF/struts-config.xml.ori -B -W -E -o xwiki.new/WEB-INF/struts-config.xml
24 sudo sdiff xwiki/WEB-INF/classes/logback.xml xwiki.new/WEB-INF/classes/logback.xml.ori -B -W -E -o xwiki.new/WEB-INF/classes/logback.xml
25 {{/code}}

Get Connected