Steve Schaefer's picture

I deployed LAMP on the cloud Friday. The cloud works great. I was able to install virtualmin and migrate one concrete5 web site to the server. Today I wanted to do some backing up so I used the EC2 management interface to create a snapshot of the volume. I decided to shut the server down to see how the menu choices change in EC2 when I do that. I issed shutdown -h now and the server shutdown. The problem is that as soon as it shudown the server went to terminated status. I was surprised. I am not able to figure out how to change the status so the server will start again.

Is the server lost for ever now?

Note I was able to click on the "Launch a new server like this one" link and the system created a new server. but it was a crystal clean install of TKL LAMP.

What does the Unregister from Hub link do

Thanks for any help

Jeremy Davis's picture

I don't have a lot of cloud and/or AWS experience so I can only speak in general. AFAIK unless you have an EBS volume mounted, server instances on AWS do not have persistent data ie you turn them off and everything is gone! As you made a snapshot though, perhaps there is some way of bringing it back using that? Also perhaps TKL attach EBS by default? I haven't played enough to be able to tell you. Hopefully (for your sake) they do (or you can somehow access your snapshot), and you just need to attach your persistent EBS drive to a new instance.

Hopefully someone who knows more about TKL on AWS will be along and able to help you out.

See this image

from this page

As far as i know "shutdown -h" now and shutdown option on console are two different things .

So if you want to stop and EBS instance , you should choose "shutdown" option on AWS console.

Again , when an instance is terminated , the data is gone :(

Alon Swartz's picture

As I described here, Amazon support two types of images, instance-store-backed (root partition stored on s3) and EBS-backed (root partition stored on an EBS volume), each with their own pro's and con's. TurnKey AMI's are of type instance-store-backed.

EBS-backed images can be "stopped" and restarted later. But instance-store-backed can't. Once they are terminated they are gone.

This is one of the reasons we developed TKLBAM, it will make sure that all customizations and data is backed up so you can terminate the instance, and restore to a new instance.

Other answers:

  • Launch a new server like this one - Convenience option to launch another instance like the original one, using the region and ebs/eip that were optionally configured on launch. This is not the same as "cloning", which we might, possibly, support now that TKLBAM has been released.
  • Unregister from hub - Removes the instance from the Hubs database.

I hope the above helps.

Steve Schaefer's picture

It makes sense, I had found this out reseraching the AWS forums.


BTW TKLBAM just produces an error on my TKLLAMP instance in the cloud, so TKLBAN it its current state it is useless.


Here is the message TKLBAM produces.


Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 267, in <module>
  File "/usr/bin/tklbam-backup", line 238, in main
    b = backup.Backup(conf)
  File "/usr/lib/tklbam/", line 251, in __init__
    self._create_extras(extras_paths, profile_paths, conf)
  File "/usr/lib/tklbam/", line 231, in _create_extras
    cls._write_new_packages(extras.newpkgs, profile.packages)
  File "/usr/lib/tklbam/", line 196, in _write_new_packages
    current_packages = Packages()
  File "/usr/lib/tklbam/", line 67, in __init__
    packages = installed()
  File "/usr/lib/tklbam/", line 40, in installed
    if line and line[0] != ' ' ])
ValueError: dictionary update sequence element #14 has length 1; 2 is required

Alon Swartz's picture

First time I've seen this issue. I sent a note to Liraz (main author of TKLBAM) to take a look. I'm sure he'll be along shortly.

Steve Schaefer's picture

I figured it could be that is why I passed the nifo along..

Liraz Siri's picture

This was some kind of strange edge case I never ran into. I can't reproduce it, so I just made the routine which detects installed package more robust. Alon still needs to update the package archive but once he does you should be able to run tklbam-backup without error.

Add new comment