Steve SC's picture

I'm Linux newbie so you may have to bear with me a little here.

Using a 3rd party KVM-based VM I created a nginx + MySQL + PHP server from an ISO of the core-11.3-lucid-x86 appliance and then used an unmodified TKLBAM configuration to back it up via the Hub to S3. A default server, half a dozen WordPress sites and phpMyAdmin were all working perfectly before the backup.

I then used the "Restore this backup to a new cloud server" facility in the Backups dashboard to create a new micro instance on EC2.

In exploring the new instance I noticed that the links in "/usr/local/nginx/sites-enabled" were restored as files and "config-db.php" and "htpasswd.setup" in "/etc/phpmyadmin" were restored with incorrect permissions (Group set to root instead of www-data) causing phpMyAdmin not to work correctly. Also a previously deleted "/var/www/index.html" was present in the restore.

After reading the TKLBAM documentation and FAQ I can also see that the file "hbr" and the folder "profile" are missing from "/var/lib/tklbam" in the new instance but presumably this could be because I haven't yet performed a backup from this new instance? (They existed in the original and I didn't modify them at all.)

Coming from a Windows background where I have lots of experience of backing up and restoring using drive imaging software I find these differences in source and destination a little unnerving.

What is it I need to know in order to use the "Restore this backup to a new cloud server" facility and end up with an exact clone of the original?

Forum: 
Jeremy Davis's picture

Hi there Steve and welcome to Turnkey Linux! Pity that your experience has been jaded like this so early on.

Unfortunately these are 2 known issues with TKLBAM currently (see the thread here and bug here).

AFAIK the problem is caused by a bug in Duplicity (the backend for TKLBAM) and as such is requiring a fair bit of work behind the scenes with the possible result being a TKL fork of Duplicity (at least until the v12.x release based on Ubuntu 12.04). I'm unclear whether it in the backup stage or the restore stage that this TKLBAM bug occurs. Because of that and with the release of Ubuntu 12.04 so close it is unclear to me exactly which way the TKL devs will go to resolve this issue. Either way, I too am really hoping this will get fixed asap. I know that it's high on Liraz's todo list.

So what this means to you at this point is that unfortunately you'll need to manually repair these symlinks and permissions in your restored instance. I would suggest that you carefully document the changes incase you wish to restore another backup/migrated instance prior to a bugfix release of TKLBAM. Painful I know...

As for stuff not being included in your restore, you'll notice that the TKLBAM backup is actually incredibly small (definately not an image!). This is because TKLBAM only backs up certain things/areas of your server. Apps installed by package management aren't included (although they too will be restored/installed assuming that they come from the standard repos included in a vanilla TKL appliance). So first thing to check is that you aren't putting things in 'naughty places'. If so, either put them somewhere else that TKLBAM does backup (ideally) or create overrides to include them (not generally recommended if you can avoid it - may have unintended consequence).

For other cool stuff that you wish to automate prior and post backup have a look at TKLBAM hooks. The (semi-)complete TKLBAM docs are proabably a useful resource too.

Steve SC's picture

Hi Jeremy

Not what I wanted to hear ... but definitely what I needed to  hear!

Thanks for the very speedy response.

Jeremy Davis's picture

See Liraz's post here.

So you should be good to go now! (If you update TKLBAM yourself, otherwise auto-update will go out tomrrow). Note that it was in the restore process that the bug occurred so your old backup should be fine to reuse.

Steve SC's picture

Thanks for the update ... but see my comment here.

Liraz Siri's picture

Bah. This symlink bug is killing us. I've talked it over with Alon and will be dropping everything else I have on my plate to fix it. More to follow....

Add new comment