On 05/16/2012 10:23 AM, CHENEAU-GREHALLE Nicolas wrote:
Hi,
Because of memory problems with our (small) server, I've decided to
switch from hibernate storage to file storage for attachments.
When I launch the filesystemAttachmentPorterScript-2.0.xwiki20 groovy
script, the script prints :
"This is your storage directory, when filesystem attachments are enabled
you have to back this up as part of your data backup routine.
/usr/apache-tomcat-5.5.25/logs/data/storage"
The value is the result of
"Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th()" command (tomcat was started from logs directory).
The xwiki doc says :
"The directory in which the attachments are stored in the filesystem is
defined with the parameter xwiki.work.dir in the xwiki.cfg file. "
But the value in my xwiki.cfg is :
xwiki.work.dir=/usr/apache-tomcat-5.5.25/webapps/xem/work
If I try the command below in a groovy script, the value is what I want,
but not the value
"Utils.getComponent(FilesystemStoreTools.class).storageDir.getAbsolutePa
th()" prints :
xwiki.getXWiki().getConfig().getProperty('xwiki.work.dir') =>
/usr/apache-tomcat-5.5.25/webapps/xem/work
It seems to me that the value of xwiki.work.dir is not used, only the
default value.
That's a bug ?
Not really. xwiki.work.dir is deprecated, and the configuration since
XWiki 3.5 is taken from the "environment.permanentDirectory" setting in
xwiki.properties. I updated
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments with the
new way to configure this.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/