If you plan to run rsync periodically to maintain a shadow copy of a running CQ instance in another server or data center, the optimal way is to configure CQ Backup to output the /crx-quickstart file structure as individual files in a hierarchy, rather than as a single .zip file This allows rsync to finish quicker since its delta backup only needs to copy files that actually changed since the last run.

The screenshot below shows the setup for CQ Backup (v5.6) at /libs/granite/backup/content/admin.html. This will produce an exact copy of the content of /mnt/cq/crx-quickstart in /mnt/cq/backup which can then be rsync’d to another server (an Amazon instance in another AWS data center) with a command such as follows (text sample here):

rsync -avzc -F –exclude=*.pid -e “ssh -i /mnt/cq/your_pki_key.pem” -h –progress /mnt/cq/backup/* –delete user@ec2-94-231-34-49.ap-southeast-1.compute.amazonaws.com:/mnt/cq/crx-quickstart

Subsequent CQ Backups will be incremental. Therefore, they will finish faster than the original backup. See a screenshot below of CQ’s error.log showing the incremental backup of a 6.5 GB repository finishing in about 2 minutes (with no changes in the repository).

Incremental rsync'ing from N. California to Singapore (with no changes in the repository) took only 30 seconds.

sent 1196652 bytes received 24758 bytes 90474.81 bytes/sec

total size is 7032213912 speedup is 5757.46

The addition of 200 (1 MB) JPG images caused the incremental CQ Backup to take about 6 minutes (AWS m1.large instance, EBS-optimized, 500 IOPS). The subsequent rsync (from N. California to Singapore) took about 3 minutes.