Tuesday, 3 December 2013

Backup and Restore: AEM/CQ5



Backup and Restore: AEM/CQ5

There are two ways to back up and restore CRX repository content: 
  • You can create an external backup of the repository and store it in a safe location. If the repository breaks down, you can restore it to the previous state.
  • You can create internal versions of the repository content. These versions are stored in the repository along with the content, so you can quickly restore nodes and trees you have changed or deleted.
The approach described here applies for system backup and recovery.
If you need to backup and/or  recover a small amount of content, which is lost, a recovery of the system is not necessarily required:
Either you can fetch the data from another system via a package.
Or
 you restore the backup on a temporary system, create a content package and deploy it     on the system, where this content is missing. For more Details see Package Backup

Package Backup

To back up and restore content, you can use one of the following:
  • Package Manager, which uses the Content Package format to back up and restore content. The Package Manager provides more flexibility in defining and managing packages.

  • Content Zipper, which uses the CRX Package, XML Sys View Package, XML Doc View, or ZIP format to back up content. You restore content in these package formats with the Content Loader.
For More Details See Creating a Backup using the Content Zipper and Restoring a Backup using the Content Loader.

Scope of Backup

When you back up nodes using either the Package Manager or the Content Zipper, CRX saves the following information: 
  • The CRX repository content below the tree you have selected.
  • The Node type definitions that are used for the content you back up.
  • The Namespace definitions that are used for the content you back up.
When backing up, CRX loses the following information: 
  • The version history.


Creating a Backup  using the Content Zipper

To create the backup using the Content Zipper:Content Zipper,
  1. Lock the top node of the tree you want to back up or a parent node of that node.
  2. In the Content Zipper, type the path of the tree you want to back up. For a format, click CRX package.
  3. Click Submit Query. Your Web browser now offers the package file as a download. Save the download on your computer.
  4. Unlock the node again.
Snapshot of Content Zipper:

Restoring a Backup using the Content Loader

To restore the backup using the Content Loader:
  1. Lock the node you want to restore. You can still modify the node and the nodes below it, but others cannot.
  2. In the Content Loader, load the CRX package that you want to restore.
  3. Unlock the node again.





Restoring the Backup
To restore the backup from a backup:
1-Restore a backup image on the system.  if you backup the datastore separately, make sure, that the datastore is restored as well to the correct location.
In case you have created a backup as a zip file, unpack this zip file using:

jar -xvf backupJune.zip



Now the repository is ready to use. You can start it now using the regular start scripts.






 














No comments:

Post a Comment