Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Opennebula & Bacula
Backing Up Your VM
Alberto García Fernández – Rentalia.com
Who am I?
● Sysadmin @ Rentalia.com
● Lazy by nature
● Automate and forget
alberto.garcia.fernandez.it@gmail.com
linkedin....
Agenda
● Making backups of VM, Why?
● A bit of Bacula
● OpenNebula & Bacula
● Demo
● Questions
Why
● I do Continuous Delivery (Puppet)
● I use some Golden/Master images too
 Images that won't change (completed projec...
A bit of Bacula
http://bacula.org/
● Backup solution
 Fetch, compress and store data across your network
● RunScript Dire...
A bit of Bacula
Backup example
OpenNebula & Bacula
FileSet example within Bacula
OpenNebula & Bacula
We want automatic backups from VM disk images
● We have to glue the pieces – from OpenNebula
➢ onevm d...
OpenNebula & Bacula
We want automatic backups from VM disk images
● We have to glue the pieces – from Bacula
➢ Client = $O...
OpenNebula & Bacula
OpenNebula Job
OpenNebula & Bacula
File.sh returns a path
OpenNebula & Bacula
File.sh
OpenNebula & Bacula
Clean.sh
OpenNebula & Bacula
Problems arise
1) Bacula connects as root but we need oneadmin
 Using 'su' within scripts or bacula d...
OpenNebula & Bacula
1) Bacula connects as root but we need oneadmin
/etc/default/bacula-fd
2) Wait for READY status on new...
OpenNebula & Bacula
3) What is the storage id to backup from the VM
Using 0 works for me. Experiment with your own env
OpenNebula & Bacula
Ok ok ok, i'll give a better solution
Questions Time
Thanks for your attention!
alberto.garcia.fernandez.it@gmail.com
alberto.garcia@rentalia.com
github.com/Alb...
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
Upcoming SlideShare
Loading in …5
×

OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García

1,915 views

Published on

How to use Bacula and live snapshot’s capabilities on OpenNebula to make backups of your virtual machines and store them.

Author Biography

Automate all the things! I love using any tool to make things to work automagically.

Published in: Technology
  • Be the first to comment

OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García

  1. 1. Opennebula & Bacula Backing Up Your VM Alberto García Fernández – Rentalia.com
  2. 2. Who am I? ● Sysadmin @ Rentalia.com ● Lazy by nature ● Automate and forget alberto.garcia.fernandez.it@gmail.com linkedin.com/in/albertogarciafdez github.com/AlbertoGarciaFdez
  3. 3. Agenda ● Making backups of VM, Why? ● A bit of Bacula ● OpenNebula & Bacula ● Demo ● Questions
  4. 4. Why ● I do Continuous Delivery (Puppet) ● I use some Golden/Master images too  Images that won't change (completed projects)  Slow to deploy services ● Machines without Continuous Delivery  Dev machines ● Making backups is always a great idea
  5. 5. A bit of Bacula http://bacula.org/ ● Backup solution  Fetch, compress and store data across your network ● RunScript Directive  Make use of scripts at different states of the backup ● Get file paths from script  Set the backup target from a script at running time
  6. 6. A bit of Bacula Backup example
  7. 7. OpenNebula & Bacula FileSet example within Bacula
  8. 8. OpenNebula & Bacula We want automatic backups from VM disk images ● We have to glue the pieces – from OpenNebula ➢ onevm disk-saveas – live backup of running VM's ➢ oneimage show – retrieve new image id ➢ oneimage delete – erase the copy
  9. 9. OpenNebula & Bacula We want automatic backups from VM disk images ● We have to glue the pieces – from Bacula ➢ Client = $OpenNebula_Frontend ➢ We get acces to the cli from Bacula connection ➢ File = “|copy_this.sh vm_(id|name)” ➢ Which returns new image path ➢ ClientRunAfterJob = “Clean.sh”
  10. 10. OpenNebula & Bacula OpenNebula Job
  11. 11. OpenNebula & Bacula File.sh returns a path
  12. 12. OpenNebula & Bacula File.sh
  13. 13. OpenNebula & Bacula Clean.sh
  14. 14. OpenNebula & Bacula Problems arise 1) Bacula connects as root but we need oneadmin  Using 'su' within scripts or bacula directives OR  Adding "-u oneadmin -g oneadmin" default/bacula-fd 2) Wait for READY status on new image  Otherwise, bacula will fetch an incomplete copy 3) What is the storage id to backup from the VM  In our case it's always 0 but you can use any parameter to identify the correct disk  Type = OS seems logic
  15. 15. OpenNebula & Bacula 1) Bacula connects as root but we need oneadmin /etc/default/bacula-fd 2) Wait for READY status on new image /var/lib/one/File.sh
  16. 16. OpenNebula & Bacula 3) What is the storage id to backup from the VM Using 0 works for me. Experiment with your own env
  17. 17. OpenNebula & Bacula Ok ok ok, i'll give a better solution
  18. 18. Questions Time Thanks for your attention! alberto.garcia.fernandez.it@gmail.com alberto.garcia@rentalia.com github.com/AlbertoGarciaFdez

×