Backup Script vs. ntbackup, in Virtual Server 2005
ASP Developer Network - Brought to you by Steve Radich and BitShop, Inc. - http://www.bitshop.com

Menu

ASPDeveloper.Net / VirtualServerFAQ.COM

Make sure you go to our home page for:

* Virtual Server 2005 FAQ
* ASP.Net 2.0 Information
* ASP.Net 2.0 Streaming Tutorials
* ASP.Net 2.0 HTML based Tutorials

Made possible by Business Internet Technology Shop (BitShop)



View :  Show duplicate posts
Virtual Server 2005

Recent Virtual Server 2005 posts

Hyper V problem
Moving a physical XP instance to a VM on VS 2005
Hyper v management console for XP
VMs are not distributed across all processors on host
SCVMM P2V in different forest
Multiple Connections to a Virtual Machine running on a Virtual Ser
disk cleanup eating up HD space
VMM.SYS BSOD
Remote logon to SBS 2000 on Virtual Server 2005
SCVMM on 2008
P to V
Stand alone VHD server
2 Differencing Disk one parent disk same time for running two mach
A couple of questions...
Hyper-V - networking issue
remove a server
Cannot run vs2005 x64 setup
VM Server and IP subnet
installing OS on virtual server
Hyper-V and OS Image file
Add Solution

Latest Topics

Table Of Contents


Post Reply |  This is Spam! | Mark as Spam

Backup Script vs. ntbackup

Source: microsoft.public.virtualserver
Sent: 03/11/2008
From: "Oranuf" <(email address - cut out)>
Message:

I really would like to get reliable snapshots of my VMs, but I'm on a tight
budget. Yes, I could run a backup from inside each VM, but they cannot see
the large USB drive I have attached to the host, so then I have to do this
weird "share the drive over the network from the host, to each VM, and map a
drive letter" thing.

From searching (and searching and searching) the Internet, I found the
script that appears below. However, whenever I run it, I get a couple
different errors:
a.. "The shadow copy of volume C: took too long to install"
b.. "The shadow copy of volume C: was aborted because the diff area file
could not grow in time.
But I do end up with what appear to be full copies of my VMs. I haven't
restored/reattached them yet, to see if they are reliable backups.

What I guess I don't understand is, why can't I use the backup program that
comes with Windows, since it ALSO appears to use Volume Snapshot/Shadow
Copy? What will happen if I use Windows Backup and then try to restore a VM
back into service? Will the VM be trashed or something?

I don't mind using the script (it doesn't show a progress bar or anything,
but it does eventually complete with the popup box message at the end), but
I need to know that it's really doing what it's supposed to.

What are my caveats here... or am I pretty much just screwed and need to
purchase a backup solution like Acronis?

Here's the script that I *think* is working, except for the errors noted
above. Do those errors mean it's really NOT working?

------------------

Set objShell = CreateObject ("WScript.Shell")
'Load current date (formatted as mm-dd-yyyy)
'into variable strToday
strTime = Month(Now) & "-" & Day(Now) & "-" & Year(Now) &_
"_" & hour(now) & "-" & minute(now)
' Backup target folder or UNC path
strBackupDir = "B:\mvs04\" & strTime & "\"
'Drive containing Virtual Machines
strVMdrive = "C:"
'VM folder path
strVMfolder = "vms"
'available drive letter used to mount shadow copy
strTempDrive = "S:"

'Prepare shadow copy commands
sExCmd = "CreateVSS.cmd"
Set oFileSys = CreateObject("Scripting.FileSystemObject")
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)

'create backup folder
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strBackupDir)

' Create Shadow copy of VM drive
oExCmd.WriteLine "vshadow.exe -script=setvar1.cmd -p " &_
strVMdrive
oExCmd.WriteLine "call setvar1.cmd"
oExCmd.WriteLine "vshadow.exe -el=%SHADOW_ID_1%," &_
strTempDrive
oExCmd.Close
Result = objShell.run(sExCmd,vbMinimized, TRUE)

'Copy the virtual machine files from the shadow copy
strSource = strTempDrive & "\" & strVMfolder
objFSO.CopyFolder strSource , strBackupDir, TRUE

' Delete created shadow copy instance
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)
oExCmd.WriteLine "Echo y | vshadow.exe -da"
oExCmd.Close
Result = objShell.run(sExCmd,vbMinimized, TRUE)

'Backup complete!
wscript.echo("Backup complete!")

------------------




Post Reply |  This is Spam! | Mark as Spam

Related Messages


Post Reply |  This is Spam! | Mark as Spam


Table Of Contents



Other groups

 
Virtual PC (Mac)(3511) Virtual PC(11949) Virtual PC (French)(428)
Virtual Server 2005(5445)
Search
in:
Our Sponsors
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
Virtual Server 2005 Info Here!
http://www.aspdeveloper.net
rss Wiki rss Blogs rss Articles rss Image galleries rss File galleries rss Forums rss Maps rss Directories
ASP Developer Network (since 1996) - Brought to you by Steve Radich and BitShop, Inc. - http://www.bitshop.com
Copyright © 1997-2005 by BitShop, Inc. All Rights Reserved.
No content may be reproduced in any form without written permission from BitShop, Inc.
We will be honored to assist with reproduction rights on our material if you contact us.
We also can provide print articles for your magazine, private training seminars at your site, and conference presentations.

Thank you for visiting. Please bookmark our site if you found it useful!
If you wish to make a donation it will help further the development of these free resources: