Restore the Database

To restore the cloud database follow the steps listed in this topic.

Tip: Sometimes you'll get this message on both startup and shutdown of the database:
could not change directory to "/root"
... where /root is actually your current directory, meaning if you run the command from /root/dir1/subdir2, then the path in the output will be /root/dir1/subdir2 instead of /root. The message is completely benign and can be ignored.

To restore the database

  1. Stop the CLC service.
    systemctl stop eucalyptus-cloud.service
  2. Remove traces of the old database.
    rm -rf /var/lib/eucalyptus/db
  3. Restore the cloud security credentials in the keys directory.
    tar -xvf ~/eucalyptus-keydir.tgz -C /
  4. Re-initialize the database structure.
  5. Start the database manually.
    su eucalyptus -s /bin/bash -c "/usr/bin/pg_ctl start -w \
    -s -D/var/lib/eucalyptus/db/data -o '-h0.0.0.0/0 -p8777 -i'"
  6. Restore the backup.
    psql -U root -d postgres -p 8777 -h /var/lib/eucalyptus/db/data -f/root/eucalyptus_pg_dumpall-backup.sql
  7. Stop the database manually.
    su eucalyptus -s /bin/bash -c "/usr/bin/pg_ctl stop -D/var/lib/eucalyptus/db/data"
  8. Start CLC service
    Note: If you are upgrading, skip this step (you don't want to start the CLC service now because you haven't restored the rest of the cloud data yet; starting the CLC appears in the installation steps, later).
    systemctl start eucalyptus-cloud.service