Category Archives: Backup & Restore

Round Robin Backup Script

This was created for a small non-profit that could not afford an expensive or recurring monthly charge for backups.
Create a directory on each computer called Backup and set permission to domain admins as well as set to hidden.
Save the text into a VBS file and set it up to run nightly


Dim da,selected
Dim DestinationPath,SourcePath,HiddenDirectory
Dim Computers
Dim shell

#computer names that have enough space to hold backup data
Computers=Array("manage1-pc","acct1-pc","work1-pc","work2-pc")

#server share that needs to be backup up
SourcePath= "d:\share\name\"

#Hiddendirectory on users computers
HiddenDirectory="Backup"

#getting the current day of the month
da=Day(now)

#This section will determine which computer it will backup to depending on the day of the month
#futurte enhancement **This needs to be rewritten to dynamically choose location so it is not relying on just four workstations **
select case da
case 1,5,9,13,17,21,25,29
selected=0
case 2,6,10,14,18,22,26,30
selected=1
case 3,7,11,15,19,23,27,31
selected=2
case 4,8,12,16,20,24,28
selected=3
end select

#function to keep all days at two digits (ie, 02,03)
Function LPad (str, pad, length)
LPad = String(length - Len(str), pad) & str
End Function

#creating the destination path to include computername, hidden directory, year, month and day in seperate folders
DestinationPath="\\"
DestinationPath=DestinationPath & Computers(selected)
DestinationPath=DestinationPath & "\C$\" & HiddenDirectory & "\"
'DestinationPath=DestinationPath & Year(Now) & LPad(Month(Now),"0",2) & LPad(Day(Now),"0",2) & "\"
DestinationPath=DestinationPath & LPad(Day(Now),"0",2) & "\"

Set shell=createobject("wscript.shell")

shell.Run("robocopy.exe " & SourcePath & " " & DestinationPath & " /mir /r:0 /w:0 /xjd /xjf /NFL /log+:d:\goodshare\BackupLogs\" & year(now) & Month(now) & ".log")

Error mounting VHD or Physical drive after motherboard crash

After a motherboard crashed I needed some specific settings and accounts out of the machine to transfer to another computer for a user. While most files can just be mounted and copied over from a slaved usb to sata converter, email accounts, Non Microsoft program settings and other specific data sometimes cannot be.

I Tried creating a VHD from the whole physical hard drive first using sysinternals, Disk2VHD. That created a vhd that I was able to mount, but still got the 0x0000007b error trying to boot.
I then mounted the physical drive in raw mode described in a previous article, same exact error message.

That meant that the drivers were incorrect for the virtual image computer. so I found a tool to fix error when booting to a volume of different hardware. Mount the vhd, add a cdrom image of Paragon_Adaptive_Restore_2010.iso and boot. Use the Adjust OS settings and Bam Everything booted up like a charm.