Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
I have used
bulk_copy.pl
to migrate an old installation to a new one.
Confusingly, it didn't work at first.
I had this structure:
/home/wikis/wiki
\_bin
\_data
/home/wikis/wiki_old
\_bin
\_data
\_some_web
So, the old installation had been renamed to
/home/wikis/wiki_old
and the new, still empty one would be
/home/wikis/wiki
.
In the old one the web
some_web
could be found.
Pretty straightforward to migrate using
bulk_copy.pl
/home/wikis/wiki/tools/bulk_copy.pl --iweb=some_web /home/wikis/wiki_old/bin/ /home/wikis/wiki/bin/ | tee > ERRORS
Well, this didn't work. Indeed
bulk_copy.pl
didn't even find the
some_web
web.
It took me some time to find out that
bulk_copy.pl
gets the path to the
data
directory (among others) from
/home/wikis/wiki_old/bin/../lib/LocalSite.cfg
The paths in that file are absolute (as opposed to relative to
bin
for example) and thus are actually already pointing to the soon-to-be installation due to my renaming tactic.
The path to
data
in
/home/wikis/wiki_old/bin/../lib/LocalSite.cfg
would be
/home/wikis/wiki/data
(which is empty when
bulk_copy.pl
is run) instead of
/home/wikis/wiki_old/data
(which actually contains the to-be-migrated web).
Thus
bulk_copy.pl
terminates immediately, as it analyses a still empty installation.
Not sure how to solve this. The easiest way might be to verify that the paths obtained from the old
LocalSite.cfg
and the new
LocalSite.cfg
are indeed different. If they are identicial, one would tell the user to manually edit the path in the old
LocalSite.cfg
and terminate at once.
--
DavidTonhofer - 03 Sep 2016
Setting to confirmed. It would be nice to re-set the file path settings relative to the referenced bin directory. That might be dangerous for sites that use alternate file system layouts, so we should at least check and warn.
--
GeorgeClark - 25 Sep 2016
As I understand it, the script did exactly what it says on the tin. OP set up two foswiki installs that share a data area - an empty one, unfortunately - and asked bulk_copy to transfer data between them, which it did. The problem is the configuration of the two foswiki installs, not with bulk_copy.
Unless I'm missing something, I don't think it did anything wrong.
--
Main.CrawfordCurrie - 06 Apr 2017 - 11:07