Tags:
create new tag
, view all tags

Question

We have started using TWiki with TWiki Version 4.1.2. We have created three separate TWiki installations (/var/www/twiki-aaa, /var/www/twiki-bbb,...) for three different teams. In the meantime we realized that it would be better to have only ONE TWiki and organize the three different teams as three Webs within one TWiki installation (/var/www/twiki-zzz). How can we merge two or more separate TWikis to only one new TWiki ?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL3
Web server: Apache 2.0.46
Perl version: 5.8.8
Client OS: XP
Web Browser: Firefox
Categories: Installation

-- RolandGoetz - 27 Jul 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

This depends on the way your teams have worked with their webs, and is much easier when done from the shell. Some guesses and hints:

  • The "interesting" files are in the pub and data directories. Unless you've fiddled with the code or the templates, the rest (bin, lib, templates, locale) should be identical in all your installations.
  • The web which contains the user ids (normally Main) needs to be carefully "merged" unless you want your users to register again. Normally you don't have much attachments in Main, so merging pub/Main should not create conflicts.
    1. Each user has two files, FirstnameLastname.txt and FirstnameLastname.txt,v. Just copy all of them to your final destination web, unless you expect problems with non-unique names.
    2. The file TWikiUsers.txt is a list of all registered users. For sake of lazyness I'd forget about the .txt,v file and simply merge the files with the editor of your choice (emacs with ediff-files may come in handy).
  • If your teams have used the same name for their data webs, merging needs to be done on a topic-by-topic base, like the Main web. Otherwise it is very easy: Just copy all the directories (with exception of the distribution webs data/Main, data/TWiki, and data/Sandbox) to the merged data directory, and do the same for the corresponding directories in pub. You can experiment with that during normal operation by creating symbolic links from e.g. /var/www/twiki-bbb/data/BBB to /var/www/twiki-aaa/data/BBB and /var/www/twiki-bbb/pub/BBB to =/var/www/twiki-aaa/pub/BBB=at any time.
  • Of course you need to adjust the Apache config and bin/configure to the "final" settings - but since you've done that three times, doing it a fourth time should not be too difficult. Use the diff command to check for differences in lib/LocalSite.cfg: Differences in path names and URLs are to be expected, the rest (e.g. different plugins) needs to be considered case-by-case.
  • For TWiki and Sandbox, choose any of your installations as a source.

You can use the grep command on the data directories to check whether some of your topics contain absolute path names. If you always wrote e.g. %PUBURL% or %ATTACHURL% when constructing links to attachments, then they'll work automatically.

Whenever you edit or create files from the shell, keep in mind that you need to make them writeable by the user id running the web server (as you had to do after the initial installation).

Some weeks ago I moved my TWiki installation to another server, and used the opportunity to rename some webs and change installation paths... it was reasonably simple. There's always the chance that something will break, but an active community will either fix it themselves or point you to the errors.

Did I write that taking a backup before making changes is a good idea? smile

-- HaraldJoerg - 27 Jul 2007

Very detailed reply Harald! smile

-- PeterThoeny - 29 Jul 2007

Hi Harald, thank you.

-- RolandGoetz - 29 Jul 2007

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-07-29 - RolandGoetz
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.