TurnKey Linux Virtual Appliance Library

Cloud Deployed TKL Lamp

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's picture

I'm not really the best person to help with this...

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.

Basil Kurian's picture

See this

See this image

http://1.bp.blogspot.com/_waT4NVCQkNE/S0NMUc5OBRI/AAAAAAAAAF4/y1KQqe9Igw...

from this page  http://shlomoswidler.com/2009/07/ec2-instance-life-cycle.html

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

Instance store vs. EBS backed images + other answers

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.

Instance store vs. EBS backed images + other answers

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.

 tklbam-backup                                   

CREATING /TKLBAM
Traceback (most recent call last):
  File "/usr/bin/tklbam-backup", line 267, in <module>
    main()
  File "/usr/bin/tklbam-backup", line 238, in main
    b = backup.Backup(conf)
  File "/usr/lib/tklbam/backup.py", line 251, in __init__
    self._create_extras(extras_paths, profile_paths, conf)
  File "/usr/lib/tklbam/backup.py", line 231, in _create_extras
    cls._write_new_packages(extras.newpkgs, profile.packages)
  File "/usr/lib/tklbam/backup.py", line 196, in _write_new_packages
    current_packages = Packages()
  File "/usr/lib/tklbam/pkgman.py", line 67, in __init__
    packages = installed()
  File "/usr/lib/tklbam/pkgman.py", 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

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.

I figured it could be that is

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

Liraz Siri's picture

Committed a fix

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.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)