Author: frm
Date: Fri Oct 16 08:38:24 2015
New Revision: 1708915

URL: http://svn.apache.org/viewvc?rev=1708915&view=rev
Log:
OAK-3521 - Improve migration documentation

Contribution by Tomek Rękawek

Added:
    jackrabbit/oak/trunk/oak-doc/src/site/resources/img/
    jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-charts.key   
(with props)
    jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-general.png   
(with props)
    jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-paths.png   
(with props)
    jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-version.png   
(with props)
Modified:
    jackrabbit/oak/trunk/oak-doc/src/site/markdown/migration.md

Modified: jackrabbit/oak/trunk/oak-doc/src/site/markdown/migration.md
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/markdown/migration.md?rev=1708915&r1=1708914&r2=1708915&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-doc/src/site/markdown/migration.md (original)
+++ jackrabbit/oak/trunk/oak-doc/src/site/markdown/migration.md Fri Oct 16 
08:38:24 2015
@@ -21,6 +21,8 @@ Oak offers a few tools which can be used
 
 ## Offline migration using oak-upgrade
 
+![oak-upgrade chart](img/migration-general.png)
+
 The `oak-upgrade` module allows to do an upgrade from the classic Jackrabbit 
2.0 repository to the Oak node store and also to sidegrade from one nodestore 
type to another. Besides from that it has a number of features that can be 
useful in everyday system maintenance:
 
 * copying only a selcted subtree from one repository to another,
@@ -103,6 +105,8 @@ Example:
 
 ### Migrating a subtree
 
+![--include-paths chart](img/migration-paths.png)
+
 It's possible to define a list of content subtrees to include or exclude 
during the migration. By default, the whole repository gets copied. In order to 
copy only a subtree, use the `--include-paths`. For example, the following 
command will copy only the `/content/site` and `/content/other_site` subtrees:
 
     java -jar oak-upgrade-*.jar \
@@ -126,6 +130,8 @@ By default, the source repository replac
 
 ### Version history copying
 
+![Version copy chart](img/migration-version.png)
+
 By default, the whole version storage is migrated. This includes referenced 
version histories (their versionable node still exists in the repository) and 
orphaned ones (their versionable node no longer exists). `oak-upgrade` allows 
to skip the orphaned version histories to make the migration faster and the 
destination repository smaller. It's also possible to define a maximum age for 
the version histories (both referenced and orphaned) to be copied.
 
 There are two parameters: `--copy-orphaned-versions` and `--copy-versions`. 
Both accepts boolean values or a `YYYY-MM-DD` date. Examples:
@@ -147,6 +153,25 @@ There are two parameters: `--copy-orphan
         --copy-orphaned-versions=2011-01-01 \
         /old/repository /new/repository
 
+### Resumed migration
+
+The migration might be stop at any time using `^C`. Resume the migration 
running the same command which was used to start it.
+
+### Custom initializers and commit hooks
+
+It's possible to inject custom logic into the upgrade process, by implementing
+[`RepositoryInitializer`](https://jackrabbit.apache.org/oak/docs/apidocs/org/apache/jackrabbit/oak/spi/lifecycle/RepositoryInitializer.html)
 or 
[`CommitHook`](https://jackrabbit.apache.org/oak/docs/apidocs/org/apache/jackrabbit/oak/spi/commit/CommitHook.html).
+
+In order to do that, create a new Maven project, with appropriate 
implementation. Then create following file:
+
+    
src/main/resources/META-INF/services/org.apache.jackrabbit.oak.spi.commit.CommitHook
+
+The file should contain just one line - the name of the class with the 
`CoomitHook` implementation. Build the project and attach the JAR to the 
oak-upgrade class path:
+
+    java -cp my-commit-hook.jar:oak-upgrade-*.jar 
org.apache.jackrabbit.oak.upgrade.cli.OakUpgrade [normal oak-upgrade parameters]
+
+A custom `RepositoryInitializer` can be injected in a similar way.
+
 ### Other parameters
 
 The full list of supported parameters can be displayed using `--help` switch.

Added: jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-charts.key
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-charts.key?rev=1708915&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-charts.key
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-general.png
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-general.png?rev=1708915&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-general.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-paths.png
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-paths.png?rev=1708915&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-paths.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-version.png
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-version.png?rev=1708915&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
jackrabbit/oak/trunk/oak-doc/src/site/resources/img/migration-version.png
------------------------------------------------------------------------------
    svn:mime-type = image/png


Reply via email to