What is the PersistanceManager (PM) is a DB? What if your clone is
using different PM (author uses Oracle, public uses Derby)
In case you change the persistence manager you have to reimport or
find an other way to move the date from one to the other store (why
don't you use an other instance/schema of the database in you case?).
Also, how would you force the "green light" on author after the
import :)
You might execute a script. We do that when we build the bundled
distribution.
You can find the code here:
http://svn.magnolia.info/svn/maven-plugins/maven-bundle-plugin/trunk/
src/main/java/info/magnolia/maven/bootstrap/post/
ActivationStatusUtil.java
The maven plugin:
http://svn.magnolia.info/maven/m2/info/magnolia/maven-bundle-plugin/
1.0.1/maven-bundle-plugin-1.0.1.jar
Snipped:
public class ActivationStatusUtil {
public static void setStatus(final String repository, final
String path, final boolean activated) throws Exception{
HierarchyManager hm = MgnlContext.getSystemContext
().getHierarchyManager(repository);
try {
Content root = hm.getContent(path);
ContentUtil.visit(root, new ContentUtil.Visitor(){
public void visit(Content node) throws Exception {
if(activated){
node.getMetaData().setActivated();
}
else{
node.getMetaData().setUnActivated();
}
node.getMetaData().setLastActivationActionDate();
node.save();
}
});
}
catch (Exception e) {
throw new NestableException("can't read path ", e);
}
}
}
Philipp Bracher
Thanks
Amir
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 25, 2007 1:36 PM
To: [email protected]
Subject: Re: [magnolia-dev] Importing large amounts of content
You can do the following:
1. build new magnolia
2. put a copy of the repository into the webapp 3. then
define the magnolia property magnolia.bootstrap.force=config
(in magnolia.properties) 4. startup (config get bootstrapped)
5. shutdown 6. reset the magnolia.bootstrap.force
Philipp Bracher
On 16.07.2007, at 21:29, Amir Mistric wrote:
Hello Magnolia developers!!!
I am faced with a bit of a problem while trying to keep our
Magnolia
installation updated.
The problem is that we have a large amount of DMS and
website content
which I have to import every time I do a fresh install of Magnolia
(from 3.0 snapshot).
For us, the fresh install is the only way to validate if
certain bug
fix works and that all bootstrap files get applied
Here is a description of what I am facing:
- there are 3 websites which we back up daily that produce 3 XML
export files. These files are about 60MB each totaling about 10000
pages of content.
- there are also 3 DMS top level folders containing various
documents
for each of the sites with sizes ranging from 10mb to 2GB
!!! Lots of
documents...
After building author and public instance, I have to:
- import these files into author
- activate them
- approve and publish to public instance
Total time it takes to do this is about 7 hours which is not very
friendly.
To speed things up I tried to turn off the versioning
command but that
didn't help much....
I could obviously, do import on both author and public but then I
don't get the "green light" on author......
There are also other difficulties associated with the process...
*There is no indication on the progress of import/export
(progress bar
would be nice but I'd be happy with some logging info that would
indicate the same....) *Using Apache+mod_jk (in my case)
will always
give me a "Proxy Error" after the import process runs for a while...
*Using Tomcat will sometimes give StackOverflow if Derby is used as
PM...
If the process fails, you have to start over again....
In all very painful process...
- Is there any way to speed this up?
If there was a way to do import with an option to set the "green
light" on, I could skip activation process and do 2 imports (one on
author and one on public). That would reduce the time to add large
amount of content...
- Are there any external tools that could be used that would speed
this up.
Any input in regards to this would be appreciated...
Amir
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------