CDash:ExternalImport

From KitwarePublic
Jump to navigationJump to search

Sometimes it might be useful to synchronize two (or more) CDash instances. Load balancing or fault tolerance are two main reasons. CDash-1-6 implements a very easy way to achieve this by running a continuous cronjob on the backup machine and rsyncing from the main CDash. Here's how we do it:

  1. Create private/public key pair so that rsync can do its job
  2. Run the rsync script to get the XML submission files from the main CDash server
  3. Run the importBuilds.php script to import the new build files into the backup CDash. The importBuilds.php write the last time of a check and makes sure that only new files are being imported.

On the backup machine setup a cronjob:

 rsync -r -a -v -z --delete -e "ssh -l cdashuser" maincdashserver:/var/www/CDash/backup/ backupmachine:/var/www/CDash/backupmaincdash/
 cd /var/www/CDash && nice php5 importBuilds.php backupmaincdash