Backing up and restoring a Eucalyptus installation involves saving and restoring the contents of five file-system locations. Three are on the CLC machine:
One on the Walrus machine (which is the same as CLC machine in a single-cluster installation):
And one on each of the cluster head nodes (again, same as the CLC machine in a single-cluster installation):
If the files at these locations are backed up, a Eucalyptus installation can be fully restored after a crash or a failed upgrade. What follows is a step-by-step guide to backup and restoration.
euca-terminate-instances ... # (as admin)
$EUCALYPTUS/etc/init.d/eucalyptus-nc stop $EUCALYPTUS/etc/init.d/eucalyptus-cc stop $EUCALYPTUS/etc/init.d/eucalyptus-cloud stop
ps aux | grep euca kill -9 ...
du -sh $EUCALYPTUS/var/lib/eucalyptus/
export BACKUP=/path/to/backup/directory mkdir -p $BACKUP
cp -a $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf \ $EUCALYPTUS/var/lib/eucalyptus/keys \ $EUCALYPTUS/var/lib/eucalyptus/db \ $EUCALYPTUS/var/lib/eucalyptus/bukkits \ $EUCALYPTUS/var/lib/eucalyptus/volumes \ $BACKUPor, alternatively, with tar:
tar cvf $BACKUP/eucalyptus-backup.tar \ $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf \ $EUCALYPTUS/var/lib/eucalyptus/keys \ $EUCALYPTUS/var/lib/eucalyptus/db \ $EUCALYPTUS/var/lib/eucalyptus/bukkits \ $EUCALYPTUS/var/lib/eucalyptus/volumes
In either case, be careful if any of the above are symbolic links as they may be copied instead of the directories they point to. Check that the backup indeed contains files from the original locations.
Same as in the Backup step, make sure no Eucalyptus components are running on any of the nodes
If you are trying to recover from a broken upgrade by rolling back or by trying the upgrade again, this would be the right time to
Warning: DEBs will restart the services: be sure you stop them again before copying back the backed-up files.
cp -a $BACKUP/eucalyptus.conf $EUCALYPTUS/etc/eucalyptus cp -a $BACKUP/keys $BACKUP/db $BACKUP/bukkits $BACKUP/volumes $EUCALYPTUS/var/lib/eucalyptusor with tar:
cd $EUCALYPTUS tar xvf $BACKUP/eucalyptus-backup.tar