|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.RepositoryCopier
public class RepositoryCopier
Tool for backing up or migrating the entire contents (workspaces, version histories, namespaces, node types, etc.) of a repository to a new repository. The target repository (if it exists) is overwritten.
No cluster journal records are written in the target repository. If the target repository is clustered, it should be the only node in the cluster.
The target repository needs to be fully reindexed after the copy operation. The static copy() methods will remove the target search index folders from their default locations to trigger automatic reindexing when the repository is next started.
Constructor Summary | |
---|---|
RepositoryCopier(RepositoryImpl source,
RepositoryImpl target)
Creates a tool for copying the full contents of the source repository to the given target repository. |
Method Summary | |
---|---|
void |
copy()
Copies the full content from the source to the target repository. |
static void |
copy(File source,
File target)
Copies the contents of the repository in the given source directory to a repository in the given target directory. |
static void |
copy(RepositoryConfig source,
File target)
Copies the contents of the repository with the given configuration to a repository in the given target directory. |
static void |
copy(RepositoryConfig source,
RepositoryConfig target)
Copies the contents of the source repository with the given configuration to a target repository with the given configuration. |
static void |
copy(RepositoryImpl source,
File target)
Copies the contents of the given source repository to a repository in the given target directory. |
static void |
copy(RepositoryImpl source,
RepositoryConfig target)
Copies the contents of the given source repository to a target repository with the given configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryCopier(RepositoryImpl source, RepositoryImpl target)
source
- source repositorytarget
- target repositoryMethod Detail |
---|
public static void copy(File source, File target) throws RepositoryException, IOException
source
- source repository directorytarget
- target repository directory
RepositoryException
- if the copy operation fails
IOException
- if the target repository can not be initializedpublic static void copy(RepositoryConfig source, File target) throws RepositoryException, IOException
source
- source repository configurationtarget
- target repository directory
RepositoryException
- if the copy operation fails
IOException
- if the target repository can not be initializedpublic static void copy(RepositoryConfig source, RepositoryConfig target) throws RepositoryException
source
- source repository configurationtarget
- target repository directory
RepositoryException
- if the copy operation failspublic static void copy(RepositoryImpl source, File target) throws RepositoryException, IOException
The source repository must not be modified while the copy operation is running to avoid an inconsistent copy.
source
- source repository directorytarget
- target repository directory
RepositoryException
- if the copy operation fails
IOException
- if the target repository can not be initializedpublic static void copy(RepositoryImpl source, RepositoryConfig target) throws RepositoryException
The source repository must not be modified while the copy operation is running to avoid an inconsistent copy.
source
- source repository directorytarget
- target repository directory
RepositoryException
- if the copy operation fails
IOException
- if the target repository can not be initializedpublic void copy() throws RepositoryException
The source repository must not be modified while the copy operation is running to avoid an inconsistent copy.
This method leaves the search indexes of the target repository in an Note that both the source and the target repository must be closed during the copy operation as this method requires exclusive access to the repositories.
RepositoryException
- if the copy operation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |