We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How can I find the VM associated with a backup ID?
Environment
All OnApp Versions
Answer
***Please see this article for additional details about working with the OnApp database***
https://onapp.zendesk.com/entries/22073502-mysql-how-to-access-the-mysql-database-in-onapp
With the introduction of incremental backups, the backup can be either associated with a disk, for the normal backups, or it can be associated with a Virtual Machine if it is an incremental backup. You will need either the Virtual Machine ID or the backup ID. Then run:
select vm.identifier,vm.hostname from virtual_machines as vm JOIN disks d ON vm.id=d.virtual_machine_id JOIN backups b ON d.id=b.target_id where b.id=xx;