[Zope] Re: use Data.fs from mountpoint B to "populate" mountpoint A
- how?
Dieter Maurer
dieter at handshake.de
Fri Oct 21 15:47:47 EDT 2005
Please send all Zope related questions to a Zope related mailing
list and not to me privately.
Usually, I do not answer questions sent to me privately!
I added "zope at zope.org".
Christoph Berendes wrote at 2005-10-21 14:12 -0400:
>I created a mount point, /default_site and a corresponding directory
>var/default_site. I build my plone site from scratch into
>default_site/site001, and all is good.
>
>I then create a second mount point /kitchensbyartisan and a
>corresponding directory var/kitchensbyartisan. I copy
>var/default_site/Data.fs into var/kitchensbyartisan. Make the new_site
>mount point in the ZMI, restart a lot etc.
>
>However, when I then navigate in the ZMI to kitchensbyartisan, it's
>empty and doesn't show site001 (or anything)
>
>Do I need something fancier than the following in zope.conf, some
>reference to default_site?
>
><zodb_db kitchensbyartisan>
>mount-point /kitchensbyartisan
><filestorage>
>path $INSTANCE/var/kitchensbyartisan/Data.fs
></filestorage>
></zodb_db>
When you use this simple mount-point syntax, then the mount
path is coded into the generated storage and you cannot
mount the storage under a different path.
Actually, the mount-point syntax is much more complex than the form
you use above. Among others, it supports
mount-point mount-path:storage-path
"mount-path" describes how you reach the mount point
in the mounting application and "storage-path" how you
find the mounted object from the storage root.
An example would be:
mount-point /F1/F2/XXX:/S1/XXX
Note that the last component in both paths *MUST* be identical
(otherwise, Zope's url construction no longer works with
URL traversal).
Usually, the "storage-path" will look like "/XXX" (where "XXX" is
some id (without '/')).
If "storage-path" is not given, it defaults to "mount-path" (this
explains why you do not see anything in your storage).
To summarize:
* always explicitely give a storage path
* use a storage path of the form "/<id>"
* then you can mount the storage at different places
*BUT* you must never mount with a different id
(the mount point must have the same id as that of the
mounted object).
--
Dieter
More information about the Zope
mailing list