Professional Documents
Culture Documents
x
Detailed steps on how to clone an instance with minimal downtime.
Instance1: the good instance that you want to clone located on server1
Instance2: is the bad instance that you to replace located on server2
1. Workflow purge
2. Audit purge
3. Version purge
4. Revision Cleanup
5. Datastore cleanup
AEM authors or publishers. In case of a MongoMK environment with a cluster, all you need to do is to unpack the AEM jar file
so that crx-quickstart directory is created. Once unpacked, just start the instance.
TarMKPreparationenvironmentonInstance1
1. While Instance1 is running, you can copy the crx-quickstart directory using the rsync command from
server1 to a directory on server2 called crx-quickstart_new (It is supposed to be at the same level of
the current crx-quickstart directory on server2). The idea is to do as much copy iterations as you can
before you shutdown so that your downtime is minimal.
2. If your Blob Store is a FileDataStore then you need to sync the datastore directory too. Create a
directory to copy the datastore content.
3. First copy will take some time to finish depending on the size of the instance, the second time will take seconds and the
third time will take less than a second. You can use this sample rsync command
for copying.
Example: rsync -vaz --delete --exclude "logs" --exclude "repository/version/index_*.tar" --exclude "repository/.lock" --
exclude "workspaces/crx.default/index_*.tar" --exclude "repository/tarJournal/index_*.tar"
username@remoteServerName:/prd/day/cq5/author/crx-quickstart /prd/day/cq5/clone-author | tee log.txt
4. Run the rsync command 3 times for the crx-quickstart and datastore directories
5. Shutdown Instance1
6. Do another rsync
7. Start Instance1
Preparation on Instance2
1. If your Blob Store is a FileDataStore then you need to point AEM to the new datastore directory. Open (../crx-
property to point to the new datastore location. Do the same for FileDataStore.config under ( ../crx-
quickstart_new/launchpad/config/org/apache/jackrabbit/oak/plugins/blob/datastore)
2. Search for sling.id.file under (../crx-quickstart_new/launchpad/felix) and delete it. You will find it in one of
the bundle directory.
3. Delete (../crx-quickstart_new/ logs) directory
4. Rename crx-quickstart to crx-quickstart_old
5. Rename crx-quickstart_new to crx-quickstart
6. Start Instance2
7. Go to CRXDE Lite and delete the (/var/discovery) node
8. At this point you will notice some warning messages in the error.log such as “No discovery info available”. This is
9. Login to the OSGI Console and start the “Apache Sling Resource-Based Discovery Service” bundle.