Oracle VM VirtualBox backups

Discussion in 'Business & Enterprise Computing' started by theyesmen, Mar 7, 2021.

  1. theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    I asked a colleague about this a while back but was met with a no answer, answer.

    I have searched on the internet but all I get is a bunch of irrelevant technical information which provides a no answer, answer.

    ...

    6 months has passed and I still feel I do not know the answer to this question.

    During the usual backup cycle we turn off each VM instance to create a 1:1 copy of the machine and its residing directory. Once the backup is complete the machine gets switched back on. No big deal, it doesn't really take long at all.

    What I have always wondered though, is can the VMs be copied and backed up while they're running, without any threat to the integrity of the data of either the original or backup?
     
  2. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,217
    Location:
    Brisbane
    With some very specific and unlikely/contrived exceptions, the answer here is no.

    The VM's virtual disk is going to be written to constantly as the VM is used. Even if you think "nothing is happening", data blocks on the disk are being modified to update things like file access time, or endless background tasks that every OS does. And you have no control and no idea where on the virtual disk those changes are happening.

    By the time you've copied the entire disk start to finish, several changes have been made to it (potentially to bits you might have already copied), and the end state is inconsistent. Restoring from this image will at best result in necessary disk checks, and at worst produce corrupt data.

    You can "pause" VMs, which pauses both compute and IO. In this state the VM image can be backed up, but how your applications perform after coming out of this frozen state can vary (especially if they're sensitive to sudden time drift). However that can sometimes be better/faster than needing a full power off. But again, restoring these will typically produce an image of a machine that didn't have filesystems unmounted cleanly, and demand a file system check on start, as well as potentially producing corrupt data depending on what has it hasn't be flushed to disk correctly.

    Using smarter internal tools like file systems that support shadow copy / VSS, or snapshots and binary log style send/receive are a much better way to keep your uptime, however these require configuration inside the VM itself, and/or licensed software depending on the OS and local sysadmin competence.

    Likewise deploying/maintaining systems via proper enterprise configuration management tools and merely copying the created data regularly is another method that can avoid the rather "brute force" approach of whole disk image copies. But again, that depends on if your IT people have the smarts to deal with it.
     
    Last edited: Mar 7, 2021
  3. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    Thank you. That's exactly the response I was seeking.

    You have reassured me that our current backup practise is the right course of action, for the resources we have.
     
  4. juz88

    juz88 Member

    Joined:
    Jan 11, 2010
    Messages:
    787
    Location:
    Sydney NSW
    i'm assuming your using Oracle VMs to get around the Oracle DB pricing on VMware which is just insane.

    I personally would stay away from VSS snapshots, lot of extra work for not much gain. Backup the DB directly using something else. Crash consistent snapshots via Veeam, I can never understand why people want to backup windows server VMs you should be able to build these almost instantly. Keep the drive with the actual data you want separate so you can just replace the VM whenever you want.

    VSS will just cause you more headaches trust me.
     
  5. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,217
    Location:
    Brisbane
    I'll be blunt: Virtualbox for server workloads is pretty nuts. I've been responsible for some crazy cowboy stuff in my time, and even I wouldn't go there.

    Proxmox is worth a Google.
     
    NSanity and GumbyNoTalent like this.
  6. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    These are not Windows-based servers.

    I will be equally blunt - we have utilized VirtualBox into the server mix since 2013. Not a single problem experienced. We have zero reason to suddenly migrate away from a perfectly working server array.
     
  7. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    44,217
    Location:
    Brisbane
    Except having a terrible backup / BCP system, I guess. I'd consider that "a problem" if it was my stuff.
     
    Dilbery and BAK like this.
  8. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    Not a problem related to server operation.
     
  9. chip

    chip Member

    Joined:
    Dec 24, 2001
    Messages:
    3,950
    Location:
    Pooraka Maccas drivethrough
    is this done manually?
     
  10. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    Partially. The turning off of VMs and rebooting them once backup procedure is complete is a manual process. Most other stuff is set and forget.

    It's really not a big deal. Our entire infrastructure and server array is a blend of bare metal and VMs. Referencing my original question, if it was safe to backup VMs while they are running the entire procedure could theoretically be automated. Since it's not suggested as a safe thing to do to maintain data integrity, it's simply part of the backup procedure to turn them off.
     
  11. syx

    syx Member

    Joined:
    Jul 30, 2001
    Messages:
    593
    Location:
    Mount Gambier
    Thats amazing, how do you keep yourself motivated to do such mundane repetitive tasks when solutions exist.
    less than 10 vm's ? veeam will do that for free.

    ive never had a fire in my house, but I still have smoke alarms.
     
  12. chip

    chip Member

    Joined:
    Dec 24, 2001
    Messages:
    3,950
    Location:
    Pooraka Maccas drivethrough
    you can even automate startup/shutdown of Virtualbox VMs with the vboxmanage tool
     
  13. syx

    syx Member

    Joined:
    Jul 30, 2001
    Messages:
    593
    Location:
    Mount Gambier
    are you telling me that you could script the entire thing ?

    like

    automatically ?

    maybe even put in some logic to check results and then notify you on success and notify your whole f*cking team on failure ?

    it'll never work.
     
    fredhoon and wazza like this.
  14. ir0nhide

    ir0nhide Member

    Joined:
    Oct 24, 2003
    Messages:
    4,568
    Location:
    Adelaide
    Is that you Mitch01?
     
  15. BAK

    BAK Member

    Joined:
    Jan 7, 2005
    Messages:
    1,215
    Location:
    MornPen, VIC
    I think Mitch is a bit busy this week, his Exchange 2003 box has had it rough with recent CVEs, so much so that he's considering pulling the trigger on upgrade to 2010..
     
    ir0nhide and Dilbery like this.
  16. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    Well, consider that turning off all the VMs takes less than 1 minute and rebooting the entire VM array takes about 2 minutes, I can honestly say I have never struggled to find motivation for a 3 minute task.

    If you need something to motivate you for a 3 minute task then I'm glad you're not a member of my team.
     
  17. leighr

    leighr Member

    Joined:
    Feb 28, 2002
    Messages:
    592
    Location:
    Richmond, Melbourne
    If you need motivation to automate something that can just as easily be done by a computer, saving you those three minutes every <whatever your back frequency is>, then I'm glad I'm not in your team.
     
  18. wazza

    wazza Member

    Joined:
    Jun 28, 2001
    Messages:
    3,721
    Location:
    NSW
    IMO it's not about the length or difficulty of the task, but backups *need* to be as automated as possible. Far easier with an automated backup to schedule it for a convenient time, avoid the need for someone to remote in or work unusual hours to do the backup, and avoids any issues of someone forgetting to do it, forgetting a step, getting too busy so it's not done, takes too long so they don't want to wait around etc.
     
    NSanity and elvis like this.
  19. OP
    OP
    theyesmen

    theyesmen Member

    Joined:
    May 9, 2017
    Messages:
    92
    Location:
    AUSTRALIA
    Consider this for a moment:

    It involves nothing more than a couple of clicks of the mouse.

    Nothing... more!

    What you are suggesting is I save myself a couple of mouse clicks for one task, just to free up 3 minutes to move on to another 3 minute task which would undoubtedly involve a couple of mouse clicks on that task?

    That's not a productivity argument. That's an argument which is absurd.

    That entirely depends on scale of infrastructure, capability of resources, network configuration... the list of variables is endless. Like I have pointed out already, the majority of our backups are already automated.
     
  20. looktall

    looktall Working Class Doughnut

    Joined:
    Sep 17, 2001
    Messages:
    26,605
    Now how many times per month are you doing that?
    What happens if you're off sick?

    Is that the entire backup task or just one part of it?
     
    Last edited: Mar 16, 2021
    BAK and elvis like this.

Share This Page

Advertisement: