Backup & Recovery

 View Only
Expand all | Collapse all

How to backup a VMDK

  • 1.  How to backup a VMDK

    Posted Mar 16, 2011 05:46 PM

    I want to backup our VMDK, on a tape drive if possible, with netbackup.

    Does netbackup is the best software for that? or which netbackup version do the best job?

    thanks



  • 2.  RE: How to backup a VMDK

    Posted Mar 16, 2011 05:53 PM

    Hello.

    NetBackup is really good at this, with the newest versions being much better than the previous ones.  What version of NetBackup do you have?  Is it Standard or Enterprise?

    Good Luck!

    Note: This discussion was moved from the ESX 4 forum to the Backup & Recovery forum.



  • 3.  RE: How to backup a VMDK

    Posted Mar 16, 2011 05:55 PM

    we have 6.5 enterprise



  • 4.  RE: How to backup a VMDK

    Posted Mar 16, 2011 06:07 PM

    Assuming that you have vCenter, your media server can already see your VMFS volumes, you have the VCB framework installed, and a couple of other things, you would just create FlashBackup-Windows policies around the virtual machines you want to backup.

    If you can get to NetBackup 7 (7.1 just came out), the setup is even better as VCB can be left behind and the vStorage APIs can be used instead.  The upgrade to 7 is well worth the effort.  VCB is also reaching its end of life, so it may not make a lot of sense to build a backup strategy around it.



  • 5.  RE: How to backup a VMDK

    Posted Mar 16, 2011 06:14 PM

    No we do not have vCenter, its only a ESX 4.1 with a local storage, no SAN or watever.

    We wondering if we should install a netbackup agent on the ESX server or just on the VM's ?

    Thanks



  • 6.  RE: How to backup a VMDK

    Posted Mar 16, 2011 06:22 PM

    I don't know of a way to use NetBackup to get the VMDKs, outside of the vCenter approach I described earlier.  You might be able to leverage the VCB framework and some scripting, but I don't believe it is possible to install an agent on the ESX host and get the VMDKs that way.



  • 7.  RE: How to backup a VMDK

    Posted Mar 18, 2011 12:26 AM

    the closest would be using the old VCB proxy to have it dump on a file share and netbackup picking up the VMDK from there.



  • 8.  RE: How to backup a VMDK

    Posted Mar 18, 2011 12:59 AM

    If you are just looking to do this once, or on an infrequent basis, you could always just browse the datastore, right-click whatever files you want, and select download.

    Granted this is not an ideal way to do it, but it should work.



  • 9.  RE: How to backup a VMDK

    Posted Mar 18, 2011 03:02 AM

    the above would be possible if only the VM is powered off right?



  • 10.  RE: How to backup a VMDK

    Posted Mar 18, 2011 03:28 AM

    That would probably be the easiest/safest way...although if you took a snapshot, it would leave the original vmdk alone(besides reads) and just make the changes to the 000001.vmdk or whatever that convention is for snapshots. At that point I guess you could grab the original vmdk.

    I would also say you could clone to template first, but you can't do that in when connected directly to the host...

    Granted I have never needed to do any of this, but it certainly sounds/seems like it could work :smileyhappy:



  • 11.  RE: How to backup a VMDK

    Posted Mar 18, 2011 12:20 AM

    Hello,

    If you're still looking for an answer to this problem I have a potential solution.  I feel I have to say that I work for this software company.

    Check out this website and let me know if you have any questions.

    www.inmage.com

    Noah



  • 12.  RE: How to backup a VMDK

    Broadcom Employee
    Posted Mar 18, 2011 03:54 AM

    Simpler way:

    Install the NetBackup linux client agent on to the ESX and then from the Backup Server, choose to backup the VMDKs you need onto the tape.

    Alternatively:

    If you are using Classical ESX version <= 4.1 you can use  vcbMounter command on the COS directly.This can be used for both powered on and powered off mode- fullvm backup or you can use vcbSnapAll. This cannot copy data directly to tape and you should use a backup software to do that.

    See the below help:

    --------

    [root@LG-ESX ~]# vcbMounter
    [2011-03-18 09:02:09.077 F4F47B60 info 'App'] Current working directory: /root
    [2011-03-18 09:02:09.152 F4F47B60 error 'vcbMounter'] Error: Missing command lin                                                                             e option
    VMware Consolidated Backup -- Virtual Machine Mount Utility
    Version 4.0.0 (build-164009)
    Copyright (C) 1998-2009 VMware, Inc.  All rights reserved.
    Usage:
    vcbMounter -h <url> -u <username> [-p <password>] <operation> [<verbosity>] [<mo                                                                             de>]
                <url> := <hostname>[":"<port>]
          <operation> := <mount_op> | <file_umount_op> | <auto_umount_op>
          <verbosity> := -L (0-6)
               <mode> := -m "cos"|"nbd"|"nbdssl"
           <mount_op> := -a <VM> <mountPoint> [<flavor>][<datastores>]
    <file_umount_op> := -d <VM> <SnapId> <mountPoint>
    <auto_umount_op> := -U <mountpoint_dir>

                 <VM> := <moref>|<uuid>|<ipaddr>|<...> [-c <cacheFile>]
                         (See VM Backup guide for complete list of search
                         criteria.)
         <mountPoint> := -r <dir>
             <flavor> := -t "fullvm" [<export-flags>]
         <datastores> := -C <datastore_catalog_file>
             <SnapId> := -n <ssid:"Sdk-MoRef">|<ssname:"SnapshotName">
       <export-flags> := -M (0|1) -F (0|1)

    If no password is specified on the command line, you will be prompted for one.

    Export Flags:
    -M: If set, the disk is exported into a single (monolithic) file.
         When turned off (default), the disk is split into multiple 2GB files.
    -F: If set, the disk is exported as "flat" disk, with no optimizations.
         When turned off (default), the exported disk files will be more compact as
         unused space in the disk image is not included in the  exported file.

    Examples:
    +) Do a full VM style backup of vm "foo.bar.com" across the SAN,
       talk to ESX/VC host "wisdom.bar.com" as user "vc" with
       password "foobar". - Export will go to "d:\backups":

       vcbMounter -h wisdom.bar.com -u vc -p foobar -a ipaddr:foo.bar.com \
                  -r d:\backups\foo-fullVM -t fullvm

       Full VM backups export an entire virtual machine into a set of
       files within a directory. Backing up this file set allows for the
       entire virtual machine to be restored later on.

    +) Do an automatic unmount of the export just created:

       vcbMounter -h wisdom.bar.com -u vc -p foobar \
                  -U d:\backups\foo-fullVM

       An automatic unmount will work for both file-level and full VM mounts.
       (A full VM unmount operation just has to delete the exported files.)

    Hope this helps.

    Regards

    LG