TurnKey Linux Virtual Appliance Library

TLKBAM backup from VM and restore to same appliance in cloud server

Suppose I create a backup using TKLBAM from a VM running in a local machine and then I create the same machine / appliance in Amazon cloud server, can I restore the backup including the configuration I have created to the cloud server running the same appliance.

The idea is to migrate from the VM / local machine to the cloud.

Any suggestions?

Chris Musty's picture

Easy

Thats kinda what it was designed for.

I would check the DNS stuff is setup correctly after a move but I have done this many times, in fact when  I make major changes I pull a clients backup from the cloud, work on it on my own VMS before pushing it back to the cloud.

Chris Musty

Director

Specialised Technologies

Thanks, Chris,  once we have

Thanks, Chris,  once we have the server running in the cloud, can we use cron job to automatically shut it down and boot it the next day because I do not need the instance to run for 24 hours.

Have a Merry X'mas.

Jeremy's picture

You can use a cron job to shut it down

But you won't be able to start it like that (if the server isn't running, then the cron job won't run either...)

I haven't played with it yet, but the Hub has an API which could be used for this purpose. Have a look in the docs at HubTools.

Also be aware that if you are using a S3 backed instance you will lose your data when you shut it down. Although even if you use an EBS backed instance I wouldn't 100% rely on (ie I'd make sure you run a daily backup prior to shutdown).

Cron Job

Thanks Jeremy, There is no point to be able to shut it down using cron job but not able to start it. Just defeat the purpose.

Using the Hub and API is not yet my stuff, well beyond me.

It would be great if the Hub can have something like the 'Bitnami' start and stop appliance at a specified time. from cost perspective more endusers will be encourage to run more appliances  if the appliance can be schedule to start and stop at a certain interval. Not everyone needs an appliance to run 24 hours.

Jeremy's picture

Yeah it would be nice if the Hub could do that

But if you have a computer that is on all the time (and connected to the net) you could run a TKL Core VM specificaly for the purposes of starting and shutting down your could instance. The HubTools CLI API looks pretty straight forward. You could then set up a cron job on your local VM to start and stop your server.

I know it's not quite as self contained or user friendly as what you are after, but I think it's pretty cool none the less!

Thanks Jeremy. I will give it

Thanks Jeremy. I will give it a try. Learning something new is a challenge.

You are right Jeremy

I have installed TKL Core and the hubtools. Yes it is pretty straight forward and the cron job to start and stop an instance automatically works flawlessly. Once I get to know how to configure the cronjob, it only takes 5 minutes to set it up but being a newbie to Linux, initially I had to spend a few hours googling and trying. But it is worth it. Thanks for the tip.

But I am just wondering why it had to be done  through Webmin. I tried the Webshell but it would not accept "apt-get install hubtools"


Jeremy's picture

Did you run apt-get update first?

Also there is an upstream bug in Webshell (aka ShellinaBox) that means that the dash ('-') doesn't work in some browsers (I forget which - Firefox IIRC?) so perhaps that's the issue?

Otherwise it should work fine from the commandline (Webshell or any other way...).

FYI personally I prefer PuTTY for accessing the commandline on my remote (or local) servers. If using Linux or OSX (I think) then you can use SSH from the commandline like this:

ssh root@<appliance-ip>

Ditch IE

I ditched IE a few years ago and use Firefox instead. Now at last you have cleared my confusion. The dash ('-') did not show up because of Firefox. Just out of curiosity I tried it with IE and you are right, the webshell can accept the dash ('-') but anyway I am not going back to IE. I prefer open source.

Thanks for the "enlightenment"


Jeremy's picture

Chrome works ok...

I too was a big fan of Firefox but use Chrome mostly now.

Another work around is using the '-' key on the numpad (assuming that you are using a full keyboard).

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)