[one-users] Keep all the data from host_pool

Carlos Martín Sánchez cmartin at opennebula.org
Tue May 24 02:20:08 PDT 2011


Hi,

There is no straight-forward way to do this. We don't have configuration
options for DB manipulation.
I think the best workaround is to create a SQL Trigger [1] [2] , that will
copy the rows to be deleted from 'host_pool' to a new table,
'history_host_pool'.

Please be aware of this bug [3], in some rare cases you may have a new Host
using the ID of an old deleted one.


Regards,
Carlos.

[1] http://dev.mysql.com/doc/refman/5.6/en/triggers.html
[2] http://www.sqlite.org/lang_createtrigger.html

[3] http://dev.opennebula.org/issues/566
--
Carlos Martín, MSc
Project Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org <http://www.opennebula.org/> | cmartin at opennebula.org


2011/5/23 Carlos Fernández Iglesias <ciglesias at cesga.es>

> Hello,
>
> I've noticed that when a host is deleted from opennebula it's information
> is also deleted from the database. This also applies to images, networks and
> users.
>
> For accounting purposes it will be great to have none of the database
> information erased as you may need that info in some scenario, and it may
> not be there.
>
> Is there some way to prevent this from happening?
>
> Thanks.
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110524/e23d9ef1/attachment-0002.htm>


More information about the Users mailing list