Backup of Eucalyptus (1.6)
Backing up and restoring a Eucalyptus installation involves saving and restoring the contents of five file-system locations. Three are on the CLC machine:
The configuration file ($EUCALYPTUS/etc/eucalyptus.conf) The database files ($EUCALYPTUS/var/lib/eucalyptus/db) The cryptographic keys ($EUCALYPTUS/var/lib/eucalyptus/keys) One on the Walrus machine (which is the same as CLC machine in a single-cluster installation):
The Walrus buckets ("Buckets path" in Web configuration, by default $EUCALYPTUS/var/lib/eucalyptus/bukkits) And one on each of the cluster head nodes (again, same as the CLC machine in a single-cluster installation):
The SC volumes ("Volumes path" in Web configuration, by default $EUCALYPTUS/var/lib/eucalyptus/volumes) 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.
Part I: Backup 1. Clean up Eucalyptus running state Note the value of the "Buckets path" and "Volumes path" for each cluster, listed under the "Configuration" tab of the Web interface. (That is where all uploaded images, user buckets, user volumes, and snapshots are located.) Terminate all Eucalyptus instances on all nodes euca-terminate-instances ... # (as admin) Shut down all Eucalyptus components on all nodes, issuing the commands relevant for a node: $EUCALYPTUS/etc/init.d/eucalyptus-nc stop $EUCALYPTUS/etc/init.d/eucalyptus-cc stop $EUCALYPTUS/etc/init.d/eucalyptus-cloud stop Check for errant Eucalyptus processes on all nodes and kill them ps aux | grep euca kill -9 ... 2. Back up the current installation Calculate the disk space required to store the files about to be backed up (this is most relevant for buckets and volumes, which can be large). E.g., on a single-cluster installation with default Buckets and Volumes paths: du -sh $EUCALYPTUS/var/lib/eucalyptus/
Create a directory for storing these ($BACKUP) on a volume with enough disk space export BACKUP=/path/to/backup/directory mkdir -p $BACKUP Mirror the five locations, taking care to preserve the permissions on all files. E.g., on a single-cluster installation with default Buckets and Volumes paths: 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 \ $BACKUP or, 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.
Part II: Restoration 1. Clean up Eucalyptus running state Same as in the Backup step, make sure no Eucalyptus components are running on any of the nodes
2. Optionally update/downgrade Eucalyptus-related binary packages 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
remove all software components related to Eucalyptus (e.g., rpm -e or apt-get remove) and install the appropriate version by following the instructions in the Installation section. Warning: DEBs will restart the services: be sure you stop them again before copying back the backed-up files.
3. Replace the saved state Depending on how you backed up, copy the files back either with cp: cp -a $BACKUP/eucalyptus.conf $EUCALYPTUS/etc/eucalyptus cp -a $BACKUP/keys $BACKUP/db $BACKUP/bukkits $BACKUP/volumes $EUCALYPTUS/var/lib/eucalyptus or with tar: cd $EUCALYPTUS tar xvf $BACKUP/eucalyptus-backup.tar « Hypervisor ConfigurationUPEucalyptus Network Configuration (1.6) »
Printer-friendly version Login or register to post com