TurnKey Linux Virtual Appliance Library

Is it possible to restore a backup from the Hub?

I have just started experimenting with the Turnkey hub and I have a question about what's the best way to quickly restore an instance.

I only want to run my instances while I'm using them so I'm interested in figuring out the fastest way to create new instances and restore  backups to them.

I know that I can do this manually.

Part 1

Launch a new server

Do work…

Perform a backup

apt-get update
apt-get install tklbam
tklbam-init <Key>
tklbam-backup

Terminate my server

<Time passes>

Part 2

Launch a new server like this one

SSH into it

Perform restore by running these commands

apt-get update
apt-get install tklbam
tklbam-init <Key>
tklbam-restore <backup id>

What I'd like to do is some how automate Part 2 so that by simply selecting "launch a new server like this one" I don't even have to log into it to perform the restore.

I've noticed a few things like mounting an EBS volume, TKLPatch, configuration hook scripts, and user-data scripts, and I'm guessing the answer will have to do with one or more of these. But I could use a little help connecting the dots. What I've come up with so far is putting the commands from Part 2 into a script on an EBS volume that I can then execute with an SSH from my desktop. It's not a bad solution but I'm wondering if there is a better alternative.

Jeremy's picture

I'm no use for your AWS Q's (not enough experience)

But I can suggest that if you are using the new v11.0RC (or aren't they available on AWS yet?) TKLBAM is already installed (so no need for the apt-get lines of code).

v11.0RC aren't available

v11.0RC aren't available on AWS yet.

Jeremy's picture

Thanks Phil

Hopefully someone a little more useful than me will be along shortly :)

Liraz Siri's picture

We could support this but there's a catch

Thanks for the feedback, we may add support for doing this for the next release.

But it will involve a compromise. The main technical problem is that backups can be passphrase protected. So long as you only enter the passphrase on your machine (e.g., in the command line) we don't have the passphrase. This means you don't have to trust us or the Hub, which is a good thing from a security standpoint.

"Restore on launch" would only work with backups that are not passphrase protected or otherwise require you to enter your passphrase into the Hub. I guess we could support both and leave it to you to decide if the extra convenience is worth giving away some of your security.

What do you think?

Alon Swartz's picture

Implemented

Check out the announcement for details.

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)