PingWin.com

Black belts on Computer Repairs

Call 818 262 5621

Backup ALL Shared files to an external disk

Windows Home server does not offer any way to backup it self. You may use NT Backup, buy I have seeing to many times that this thing corrupt its own files or simply does not backing up entire folders without any errors or hesitations.

Due to the poor situation of the Windows world, where things simply falling apart, I am using simple BATCH file, that is use the good old xCopy to backup what is important to me.

All shared folder you are creating from within the WHS consol are located in a folder named shares, place on drive D:

What you want is to copy the entire d:\shares, with what ever in it, into an external hard drive.

Assuming that you do not want to change your batch file each time that you are creating / deleting a share folder from the WHS consol, you want to create a pointer to the "head" of all shared folders, that is the D:\shares folder.

Another thing to know is that it is recommended to access WHS files only through the \\WHS\.... path, and NOT DIRECTLY from drive D:

So you are creating a pointer to the D:\shares folder, and copy what ever in it.

So, here is what you need:

  1. From your d:\shares create a new share named "shares" with a read only rights.
  2. Access it from \\WHS\shares and make sure that you can read it and copy out from it.
  3. Create a folder Backup on drive D: (If you do it on C: the next time you'll reinstall the WHS, and it will come sooner or later, you'll lose all your backup batch)
  4. Copy the code below into Notepad and modify the names for your target external hard drive, make sure that when the batch runs, it can properly map the external drive as B:

    @echo off
    cls
    set target=d:\backup\backup2DriveB.txt
    set targetFilesB=d:\backup\backup2DriveBFiles_B.txt
    set targetFilesF=d:\backup\backup2DriveBFiles_F.txt

    echo . >>%target%
    echo . >>%target%
    echo ***** BACKUP to B Begines ****** >>%target%

    date /t >>%target%
    time /t >>%target%

    c:
    cd\
    if exist b:\*.* net use b: /delete /yes >>%target%
    REM Change \\familyDisk\BackUp to your own external
    net use b: \\familyDisk\BackUp /user:tal tb >>%target%
    dir b: >>%target%

    if not exist b:\*.* goto noB

    echo Start xCopy to B >> %target%
    echo Files copied to B at > %targetFilesB%
    date /t >> %targetFilesB%
    xCopy \\%computername%\shares\*.* b:\shares\*.* /e /c /i /r /y /d >> %targetFilesB%
    echo Complete xCopy to B>> %target%
    time /t >> %target%
    rem If you have another internal - use this code
    echo Files copied to F at > %targetFilesF%
    date /t >> %targetFilesF%
    xCopy \\%computername%\shares\*.* f:\Shares\*.* /e /c /i /r /y /d >> %targetFilesF%
    echo Complete xCopy to F>> %target%
    time /t >> %target%
    goto end

    :noB
    echo No drive B >>%target%

    :end
    if exist b:\*.* net use b: /delete /yes

    echo ***** BACKUP to B Ends ****** >>%target%
    echo . >>%target%
    echo . >>%target%
  5. Save the code from your notepad into a file name "backupShares.cmd" placed in the D:\backup\ folder.
  6. Now open control panel, schedule tasks, create new task, select the D:\backup\backupShares.cmd as the program to run, select the administrator account to be the "Run As" and MAKE SURE TO ENTER PROPER PASSWORD so the task will run when you are logged off.

NOTE: The xCopy /D insure that only new files or files that are not exist will be copied. It does not delete anything. So over time, you should anticipate that lots of garbage will be accumulated in your backup drive. Clean manually.

ALWAYS check that you can open / copy / rename your important files that are backed up.

ALWAYS CHECK the files backup2DriveB.txt and backup2DriveBFiles_B.txt to see what happened and if you indeed have backup.

NEVER trust Microsoft with your files!


Privacy  About Us  Contact Us  Work Order Make a payment Links Website Hosting Prices Computer Repair Links

Will make your computer behave!

Copyright (C) Tal Bahir, Inc 2008