1 2 3 Previous Next 367 Replies Latest reply on Apr 12, 2010 2:45 PM by dwightmccann

    Announcement: New (free) backup utility realease.


      Hello all,


      I've written a backup utility, it's currently still in 'beta' but I think I've worked out most of the bugs and it's been working very well for me, so I thought I'd share my work with the community.


      I'll be trying to update it fairly regularly, hot-clone of a VM or specific VMDK attached to a VM planned for next version.


      Please see the readme file here for some initial instructions: http://users.ox.ac.uk/~alexm/README


      You can download the utility here:




      Once you've extracted the archive, please read the README file in the directory created for instructions on using the utility.


      Any problems post them to this thread and I'll try and resolve them, I'll set up a proper website when I have the time.




      p.s. Big thanks to acr for help with testing!


      Added link to the latest release - 21st May 2007[/b]


      Message was edited by:

              MR-T: Updated with link to Xtravirt site

        • 1. Re: Announcement: New (free) backup utility realease.
          letoatrads Expert

          Thanks for taking the time to write this mittell. I'll definitely give it a whirl and throw you some feedback.

          • 2. Re: Announcement: New (free) backup utility realease.
            kix1979 Champion

            Sorry about not testing much, I've been traveling.  Look for an email later week   And so far it works well !

            • 3. Re: Announcement: New (free) backup utility realease.
              acr Virtuoso

              Great Utility, used it... Love it..


              Thanks again Alex..

              • 4. Re: Announcement: New (free) backup utility realease.
                MR-T Champion

                Like Kix, sorry I haven't had a chance to use this yet.


                Fingers crossed some lab time is round the corner.



                • 5. Re: Announcement: New (free) backup utility realease.
                  samkshah Novice

                  Works like a charm...I backed up about 8 VMs using the script without any issues. Noticed that if we had an option to terminate scheduled backup process, it would have been great for me. I actually started process (scheduled) and then realized that I needed to terminate process. However, the script works great.



                  • 6. Re: Announcement: New (free) backup utility realease.

                    Hmm that's an interesting point, perhaps the script should just check if there is already an instance running already, and if there is, refuse to run?


                    I'm slightly nervous about automatically terminating processes from a menu option, although I could put it in fairly easily.


                    If you need to terminate a backup job early for any reason you can do so as follows:


                    ps aux | grep vi-backup[/code]


                    Find the PID for vi-backup.


                    kill [/code]


                    That should terminate any existing backup, note that if a disk is currently being exported it will be completed but no further exports will be made, you will also need to remove 'Scripted Backup Snapshots' from any VMs that had a backup terminated half way though using the vi-client.


                    Version 0.8.5 will be out in the next week, with a menu option to hot clone VMs, and a few bug fixes related to DRS migrations and logging, and lock files so two instances of the script don't attempt to backup a VM simultaneously. I'll try and work something into it related to existing processes too.


                    Thanks for the suggestion, glad you found the script useful.

                    • 7. Re: Announcement: New (free) backup utility realease.
                      HanzdeVries Lurker

                      Thanks for the great script, good job!


                      Can you explain to me why backups of VM's can't be run without committing or flushing the existing snapshots? We use (manual) snapshots on quite a lot of servers and would like to preserve them. VCBMounter doesn't complain about the snapshots, that's why I don't understand why the script does. Thanks in advance!

                      • 8. Re: Announcement: New (free) backup utility realease.

                        It doesn't use vcbMounter to do the exports, couple of reasons I chose not to use it - firstly I found it to be unreliable at removing snapshots - so I decided to deal with them myself and use vmkfstools to export the disks. Secondly this way you also end up with instantly usable exported VMDKs, you don't need to use vcbRestore and the catalog file to restore the VMs - this opens other options like the ability to clone VM/specific VMDKs etc.


                        So, the reason snapshotted VMs are excluded is that I'd have to write a load of logic into the script to find existing snapshot files/.vmsd and export them as well as the base VMDK, and this would also complicate the automatic restore of VMs massivley as I'd have to make sure I re-imported the deltas properly and that the correct delta was in use.


                        I may have a crack at dealing with VMs with existing snapshots at some point but it's not a small a task.


                        Hope it's useful to you anyway.

                        • 9. Re: Announcement: New (free) backup utility realease.
                          HanzdeVries Lurker

                          Thank you for the explanation, that clears things up. For a short time I tried your previous script (I think it was called something like smb_backup.sh) and that used vcbMounter, so I assumed the new script also did.


                          The script is very useful for me, I just have to try and find a way to tackle  the 'snapshot-enabled' servers. Thanks again!

                          • 10. Re: Announcement: New (free) backup utility realease.
                            ISD Plc Enthusiast

                            Hi All,


                            Im going to look at this but wanted to ask a few questions!


                            our san is a netapp 3050c and a 3020 for DR


                            now i want to be able to backup the vm's to a volume then replicate that vol to the dr san that I can then use as a datastore in the event of a disaster?


                            So will this util create copies of the vm's or will it create backup files that can only be 'restored' also does it quiesce any file/cache activity first?


                            er think that will do for know!

                            • 11. Re: Announcement: New (free) backup utility realease.

                              Yep that should work. The util creates copies of VMs that can be used immediately (if on VMFS), no 'restore' neccesary. It creates a snapshot of the VM, thus quiescing the VMs VMDK files, and exports them with vmkfstools.

                              • 12. Re: Announcement: New (free) backup utility realease.
                                renski Enthusiast

                                this script works nicely.. thanks

                                • 13. Re: Announcement: New (free) backup utility realease.
                                  renski Enthusiast



                                  When I try to use this script with the smb option, it fails.


                                  I can't seem to chmod or chown anything on a smbmount from my samba server... I can create and delete files but not change the permissions on them.



                                  • 14. Re: Announcement: New (free) backup utility realease.
                                    renski Enthusiast

                                    \[root@dali vi-backup]# vi-backup.pl -c vi-backup.cfg


                                    *****Virtual Infrastructure Scripted Backup Utility v0.8.4 by Alex Mittell*****


                                    We're running VMware ESX Server 3.0.1 build-32039


                                    Searching for target VMs....

                                    Locating VM files....

                                    Processing config files....

                                    Target VMs from specified searchspec:




                                    Snapshotting VM logbook....

                                    Snapshot of logbook successful.

                                    Exporting disks for logbook....

                                    Exporting disk UBUNTU - Logbook Server.vmdk....

                                    Destination disk format: VMFS thick

                                    Cloning disk '/vmfs/volumes/440500b0-6cb6fa4d-412a-0017a4a74e4e/UBUNTU - Logbook Server/UBUNTU - Logbook Server.vmdk'...

                                    Failed to clone disk : File system isn't VMFS. (35)


                                    WARNING: There were one or more errors during the disk export. Please look at the VM log file.

                                    Removing Snapshot for logbook....

                                    Snapshot removed successfully from logbook.

                                    Exporting VM config and log file...

                                    Config and log file exported successfully.

                                    chmod: changing permissions of `/vmfs/volumes/storage1/ESXBackup2/logbook/logbook.restore' (requested: 0700, actual: 0755): Operation not permitted

                                    1 2 3 Previous Next