TurnKey Linux Virtual Appliance Library

TKLBAM Restore and MySql views

Lamp Stack - MySQL - TKLBAM

Hi there, I'd like to start with an apology. I'm sorry for being late to the party! I've only just discovered TurnKey, and I am so excited and impressed with it. What a great product.

Now for my problem: I have just started a new piece of development, and I wanted to transfer the work from one development host to another, so I ran a backup on the source appliance, and then performed a restore on the target.

All looked fine, everything I expected transferred across... EXCEPT the database view. Tables, Routines and data all transferred perfectly, but the views (the one and only view) did not. Is there a known issue with this, or have I done something wrong?

Thanks in advance

Andrew

Liraz Siri's picture

This might be a bug

Thanks for reporting this. I admit I didn't take database views into account in my testing so this might be a bug. I have a round of development scheduled for tklbam so hopefully I'll take a look at this soon. In the meantime as a workaround you could add a TKLBAM hook (see /etc/tklbam/hooks) that creates the missing view following a restore.

Thanks for the advice

Thank you for your advice on this. I will look into putting a hook in place to backup and restore the missing view.

In my case it is not too critical, since it is currently only a single view, but as my development progresses, there will be more.

Once again, thanks for your help

Andrew

is this solved yet?

i have the same problem. did you manage to solve it? i have lots of views and they not being backed up or restored.

how do you write a hook to save and restore mysql views? the example hook isnt very helpful.

logan

Not Yet

Hi Logan,

No, I haven't solved this yet. I tried a couple of times unsuccessfully to create pre-backup and post-restore hooks to transfer the view across, but it didn't work.

Since I only have a single view, I didn't worry about it, as I can easily recreate it after the restore. Hopefully this bug will be fixed when I have more views.

Since you have more views, perhaps you will have more success in your investigations. Good luck. If you do find the solution, then please let me know.

All the best

Andrew

Any progress with views

Any progress with views backup?

Liraz Siri's picture

Still on my todo list. Should

Still on my todo list. Should be getting back to TKLBAM development real soon now.

Liraz Siri's picture

Fixed in TKLBAM 1.3

Support for MySQL views and triggers support was added to TKLBAM 1.3:

https://github.com/turnkeylinux/tracker/issues/7

Thanks to Pionium, Logan and Marko for reporting this.

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)