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.
Launch a new server
Perform a backup
apt-get update apt-get install tklbam tklbam-init <Key> tklbam-backup
Terminate my server
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.