Eucalyptus Versions: 3.0 - 3.4
This guide explains how to test an upgrade to your Eucalyptus CLC, specifically a database schema upgrade.
WARNING: You MUST ensure that your test platform for upgrades does not have access to your REAL environment. Introducing a restored CLC into the same environment WILL break your cloud.
Install the Packages
Follow the installation guide to install the version of Eucalyptus you would like to upgrade FROM. Don't start the Eucalyptus CLC services yet. Instead, go ahead and start the database manually:
su eucalyptus -c "/usr/pgsql-9.1/bin/pg_ctl start -w -s -D/var/lib/eucalyptus/db/data -o '-h0.0.0.0/0 -p8777 -i'"
Backup the current configuration
Next, use the Eucalyptus Sosreports plugin to take a snapshot of your current configuration on the CLC, including database dumps.
You'll also need to grab the keys, so make sure you copy out /var/lib/eucalyptus/keys from the CLC.
Restore the database on your test platform
Open up the sosreport you captured in the previous step and locate the database files in sos_commands/eucadb. Take these files and restore the respective dumps:
cat eucalyptus_cloud.sql | psql -U root --port 8777 -h /var/lib/eucalyptus/db/data -d eucalyptus_cloud
Replace the database name and file with that of the relevant dump.
select pg_terminate_backend(procpid) from pg_state_activity where datname='$i' EOF; done
/usr/pgsql-9.1/bin/pg_ctl stop -D/var/lib/eucalyptus/db/data
Next, go ahead and upgrade the eucalyptus-cloud packages and start the Eucalyptus cloud service.