You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Samuel Cox <cr...@gmail.com> on 2010/01/04 18:23:21 UTC
Re: RepositoryCopier requires shutdown of source repositoy?
Jukka Zitting wrote:
> Hi,
>
> On Thu, Dec 10, 2009 at 1:34 PM, Samuel Cox <cr...@gmail.com> wrote:
>> I need to backup our repository periodically and anticipate using the
>> RepositoryCopier class. I was curious that 2 of the methods in the Javadoc
>> mention that the source repo must not be modified during the call; however,
>> the others do not. Is it possible for me to perform a backup while still
>> allowing JCR API calls that modify the repo? In other words, will
>> RepositoryCopier somehow lock/cache/unlock/flush/etc for me?
>> I'm guessing it won't/can't do this.
>
> You're right, the RepositoryCopier doesn't contain any protection
> against concurrent changes to the repository. If you allow clients to
> modify the repository while you're backing it up, you may end up with
> an inconsistent backup.
I cannot get RepositoryCopier to work regardless of whether or not
someone is modifying it. I get the following error if I've already
created a TransientRepository and logged in.
javax.jcr.RepositoryException: The repository home
/opt/fuse-esb-4.1.0.0/data/di/repository/design/repository/repository
appears to be in use since the file named .lock is already locked by the
current process.
at
org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:159)
at
org.apache.jackrabbit.core.util.RepositoryLock.acquire(RepositoryLock.java:138)
Does this mean that I have to shutdown the TransientRepository before I
can perform the backup? When I do that it works, but I was under the
impression I did not have to do this.
Thanks.
--
Samuel Cox
Re: RepositoryCopier requires shutdown of source repositoy?
Posted by Thomas Müller <th...@day.com>.
Hi,
> I cannot get RepositoryCopier to work regardless of whether or not someone
> is modifying it. I get the following error if I've already created a
> TransientRepository and logged in.
See http://wiki.apache.org/jackrabbit/RepositoryLock#Why_Is_the_Repository_Locked
> Does this mean that I have to shutdown the TransientRepository before I can
> perform the backup?
You need to only one Repository instance at any time. You can open
multiple sessions however.
Regards,
Thomas