Bare Metal Disaster Recovery for Windows Vista Home: Caveats

When you backup your system using this technique the system is backed up in a crash-consistent state. When you restore from the backup it’s like someone yanked the power cord out of your computer at the time you started the backup. The file system used in Windows Vista Home (NTFS) can cope with that so for the most part your files will be ok but some programs may not (e.g. they might have been halfway through writing a file).
It’s also important to note that robocopy does not copy NTFS junction points. This is normally harmless but it can stop some older, poorly written programs from working.

You can run the batch script below based on Ben Hunter’s post here to re-create the junction points. Save the file as mkjunctions.cmd, then right-click on it in Windows Explorer and select Run As Administrator.

REM ***************************************************************************

c:
cd\

REM *** EDIT THE LIST BELOW TO INCLUDE ALL THE USERS ON THE SYSTEM + Default **

for %%U IN (Default Chris) DO (

cd\users\%%U
rd "Application Data"
mklink /J "Application Data" C:\Users\%%U\AppData\Roaming
rd Cookies
mklink /J Cookies C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Cookies
rd "Local Settings"
mklink /J "Local Settings" C:\Users\%%U\AppData\Local
icacls "Local Settings" /deny Everyone:(RD^)
rd "My Documents"
mklink /J "My Documents" C:\Users\%%U\Documents
rd NetHood
mklink /J NetHood "C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Network Shortcuts"
rd PrintHood
mklink /J PrintHood "C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Printer Shortcuts"
rd Recent
mklink /J Recent C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Recent
rd SendTo
mklink /J SendTo C:\Users\%%U\AppData\Roaming\Microsoft\Windows\SendTo
rd "Start Menu"
mklink /J "Start Menu" "C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Start Menu"
rd Templates
mklink /J Templates C:\Users\%%U\AppData\Roaming\Microsoft\Windows\Templates
cd\users\%%U\appdata\local
rd "Application Data"
mklink /J "Application Data" C:\Users\%%U\AppData\Local
icacls "Application Data" /deny Everyone:(RD^)
rd History
mklink /J History C:\Users\%%U\AppData\Local\Microsoft\Windows\History
rd "Temporary Internet Files"
mklink /J "Temporary Internet Files" "C:\Users\%%U\AppData\Local\Microsoft\Windows\Temporary Internet Files"
cd\users\%%U\documents
rd "My Music"
mklink /J "My Music" C:\Users\%%U\Music
rd "My Pictures"
mklink /J "My Pictures" C:\Users\%%U\Pictures
rd "My Videos"
mklink /J "My Videos" C:\Users\%%U\Videos
)

rd "Documents and Settings"
mklink /J "Documents and Settings" C:\Users
icacls "Documents and Settings" /deny Everyone:(RD^)
cd\programdata
rd "Application Data"
mklink /J "Application Data" C:\ProgramData
icacls "Application Data" /deny Everyone:(RD^)
rd "Desktop"
mklink /J "Desktop" C:\Users\Public\Desktop
rd "Documents"
mklink /J "Documents" C:\Users\Public\Documents
rd "Favorites"
mklink /J "Favorites" C:\Users\Public\Favorites
rd "Start Menu"
mklink /J "Start Menu" "C:\ProgramData\Microsoft\Windows\Start Menu"
rd Templates
mklink /J "Templates" C:\ProgramData\Microsoft\Windows\Templates
cd\Users
rd "All Users"
mklink /D "All Users" C:\ProgramData
rd "Default User"
mklink /J "Default User" C:\Users\Default
cd\Users\Public\Documents
rd "My Music"
mklink /J "My Music" C:\Users\Public\Music
rd "My Pictures"
mklink /J "My Pictures" C:\Users\Public\Pictures
rd "My Videos"
mklink /J "My Videos" C:\Users\Public\Videos

REM ***************************************************************************

One Response to “Bare Metal Disaster Recovery for Windows Vista Home: Caveats”

  1. Hi,

    I use robocopy on my windows XP. I have noticed a problem with it. I am wondering if you have experienced the same and have a workaround for it.

    If I have already taken a backup using robocopy, and then change the security descriptor or attributes (read only, hidden etc) on a file in the source directory, taking a backup again using robocopy does not copy the new security descriptor or attributes to the backed up file. However, if I write something to the file in the source directory and then take a backup using robocopy, the changed security descriptor, attributes get copied on the backed up file. This seems to work fine for subdirectories. It’s only a problem with files.

    I use the following command string:
    C:\Program Files\Windows Resource Kits\Tools>robocopy src_dir
    dst_dir *.* /COPY:DATSOU /E /B /MIR

    Do you have any idea how to fix this?

Leave a Comment