[Zope] Re: use Data.fs from mountpoint B to "populate" mountpoint A - how?

Christoph Berendes berendes at netalyst.com
Mon Oct 24 11:27:05 EDT 2005


Sorry and thanks.

I've found that the when I initially create a separate mount point and 
Data.fs file with

mountpoint /original

and then copy Data.fs to
../newlocation

this almost works:
mountpoint /newlocation:/original

It works, in that I can navigate through the ZMI, but it fails in that 
the plone site embedded in this Data.fs file generates urls that point 
back to ../original.

Your comments explain why. Thanks.

Question: this wouldn't be the case for a Zope or Plone folder. If I 
rename a folder from 'old_folder_name' to 'new_folder_name', it appears 
that the folder has no "memory"  of old_folder_name. However, it appears 
that a mount point "remembers" where it was created.  Isn't that in some 
sense a bug?


Dieter Maurer wrote:

>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).
>
>  
>



More information about the Zope mailing list