I have been thinking about Disaster Recovery Server Backup Strategy to “recover my data” in case my MSS and it’s connected “data pool” eSATA tower were lost. Most of the thinking has revolved around the use of JohnBick’s ROBOCOPY and XCOPY scripts and how they could be adapted to my needs. There is the distinct possibility that my needs may be similar to yours so I wanted to openly discuss my decisions and to ask you to either validate or criticize my strategy. I seek primarily your constructive
criticisms. Your validation will confirm I am on the right track but your criticisms could lead to improving the strategy. My initial post is placed here since we will be discussing modifications to John’s script. I have permission from the thread owner to start the discussion here. If the discussion moves outside that area, I will move further discussions to a new thread.
My work in recent days has been focused on adapting John’s script to my needs. They differ from John’s because of my need to synchronize some of my Share Folders that contain a substantial number of large DVR-MS and WTV files and my concern for the time it will take each day for the scrip to back up the volume of data involved. Since some of my server share folders contain lots of large files, my needs require me to back these folders up to more than one target drive, even if one of those target drives is a 1.5 TB (or larger) external drive. These are the main reasons John’s script needs some modification to meet my needs.
Other (but not as critical) considerations had to do with speed as well but also took in to consideration my interest in automating the backup of the WHS Backup Database (BDBB, a term “coined” by Alex/Yakuza) and the Server Shared Folders. Unfortunately, in the first implementation of my strategy, I have been unable to “completely” meet the “fully automated” objective. However, full automation is easily achieved with the addition of some hardware…more about that later.
I considered several backup products like RichCopy, SyncToy, Second Copy, and the Server 2003 OS backup software to name a few. For one reason or another I finally settled on using XCOPY and ROBOCOPY. We can discuss this decision in another thread if you like. It’s conceivable I may modify my Disaster Recovery Server Backup Plan to include some of this software in the future. But, at least temporarily, I am implementing my Backup Strategy with XCOPY and ROBOCOPY.
I chose XCOPY (mainly for its speed over ROBOCOPY as discussed in JohnBick’s post above) for some backups I will likely move form a manual weekly process over to a daily command file driven script in the future. I say “in the future” because I do not presently use XCOPY in the script shown below but I have shown how it would be used. For now the XCOPY command lines are “remarked out” with REM commands. When my strategy moves to that of “complete automation”, the XCOPY commands will become relevant then. I show them now so we can discuss them if you like.
I also considered backup target hardware options, but since I already had enough external drives to get my plan started with the hardware I presently own, I chose to go with three or maybe eventually four external drives. In my adapted script show below I only use two of these drives (E: and F: ) but one other drive is presently being used (G: ) outside this script. In the current implementation of my strategy I have to manually run a PP1 style Server Backup which uses the G: Drive. And as my backup volume grows I may eventually use a forth drive (H: ) either as part of this script or outside it. I have these four external drives now. Eventually I want to go to a single 4-Bay RAID 5 enclosure with 2TB drives. This enclosure will be seen as a single target drive E: . When the enclosure is available the script will be somewhat simplified. The presence of a single large RAID 5 target drive will allow me to “completely” automate the backup strategy and will allow me to execute it on a daily instead of a weekly basis. Right now, my strategy requires a manual weekly step that is simple to run, yet keeps my present plan from being fully automated.
Before I show the script here is a copy of what my Shared Folders Tab looks like. You can see Folder Name, Sizes and duplication status here. When I have the Server Backups in place I plan to turn duplication OFF on many of these folders and free up some more drive space inside my server for data pool files.
Attachment:
ScreenHunter_07 May. 03 21.30.gif [ 57.96 KiB | Viewed 14342 times ]
A copy of my script is show below for your review. At this point I have not run the script on my server but I will be doing that sometime today. I have some questions that could be answered by trial and error but I will be asking some specific questions in another post here if I have trouble getting the script to execute properly. Hopefully, if that does happen, I can ask any of you that may be reading this post (including JohnBick) for a few pointers in getting the script to work as I planned it. I have tried to “comment” the script with notes but please feel free to ask any questions you may have about it if I have not made my intentions clear.
REM
***begin script***REM Copy WHS Backup Database and Shared Folders to an unmanaged disk drive
REM This script assumes the target is Disk F: -- modify script in two places if that is to be changed
REM The logs are placed in the C:\root directory. That can also be changed (22 places)
REM A Critical Error will be present on the server when the Backup Database is being backed up as the Backup Service will be shut down.
REM - This may be safely ignored as it will be restarted at the completion of the database backup
REM
Note: I have attemped to "boldface" notes and changes/additions I made to to JohnBick's script. REM
Any information not in Bold are parts of JohnBick's original XCOPY or ROBOCOPY scipts as shown above in this thread.REM
Note: Throughout this script I have "remarked out" parts of this script with "REM***" to show lines of the scriptREM
that will be included in the script or not included depending on the the test conditions. When this script goes into "production" REM
all lines with "REM***" at the beginning will be removed.REM Backup the WHS BACKUP DATABASE
REM Stop the Backup Service
REM***NET STOP PDL
REM***NET STOP WHSBackup
REM Copy the "backup" folder
REM***XCopy D:\folders\{00008086-058D-4C89-AB57-A7F909A47AB4} F:\Backups\{00008086-058D-4C89-AB57-A7F909A47AB4} /D /E /V /C /I /G /H /R /K /X /Y >C:\Temp\External-Backups.log
REM Start the Backup Service
REM***NET START WHSBackup
REM***NET START PDL
REM Rename the log files to save last NINE
REM***erase C:\Temp\External-Backups-1.log
REM***rename C:\Temp\External-Backups-2.log External-Backups-1.log
REM***rename C:\Temp\External-Backups-3.log External-Backups-2.log
REM***rename C:\Temp\External-Backups-4.log External-Backups-3.log
REM***rename C:\Temp\External-Backups-5.log External-Backups-4.log
REM***rename C:\Temp\External-Backups-6.log External-Backups-5.log
REM***rename C:\Temp\External-Backups-7.log External-Backups-6.log
REM***rename C:\Temp\External-Backups-8.log External-Backups-7.log
REM***rename C:\Temp\External-Backups-9.log External-Backups-8.log
REM***rename C:\Temp\External-Backups.log External-Backups-9.log
REM Backup Database backed up, backup service has been restarted, and logs saved
REM Windows Home Server backup of the
"Selected" SHARES folder that "Require synchronization"REM
Use RoboCopy to Copy the “synchronized shares” foldersREM
Note: I am using RoboCopy here instead of Xcopy because of the Mirrowing parameter if offers. REM
I have also changed the LOG parameter to LOG+ in (the second and following...if one needs to synchroize more thatn two) RoboCopy commands to appendREM
the status to the log file rather than overwrite it. In this script I have two RoboCopy commands because thereREM
are two D:\share subfolders that require synchronization. These subfolders are on Target Drive E:REM Copy the shares folder in Mirror Mode, Restartable, All attributes, No progress, 4 retries, 5 second wait between retries, Log to file in c:\temp, Console output
REM
REM***c:\Robocopy "D:\shares\Recorded TV" "E:\Shares\Recorded TV" /MIR /Z /COPYALL /NP /R:4 /W:5 /LOG:"C:\External-Shares.log" /TEE
c:\Robocopy "D:\shares\TV Collections-Permanent" "E:\Shares\TV Collections-Permanent" /MIR /Z /COPYALL /NP /R:4 /W:5 /LOG+:"C:\External-Shares.log" /TEEREM
Note: Pay no attention to the next line. It is in this script for potential use in the future should I decide to replace the PP1 weekly backups with daily automated backups using this script.
REM XCopy D:\shares E:\Shares /EXCLUDE:ExcludedShareFolders.txt /D /E /V /C /I /G /H /R /K /X /Y >C:\temp\External-Shares.log.REM Rename the log files to save last NINE
REM***erase C:\Temp\External-Shares-1.log
REM***rename C:\Temp\External-Shares-2.log External-Shares-1.log
REM***rename C:\Temp\External-Shares-3.log External-Shares-2.log
REM***rename C:\Temp\External-Shares-4.log External-Shares-3.log
REM***rename C:\Temp\External-Shares-5.log External-Shares-4.log
REM***rename C:\Temp\External-Shares-6.log External-Shares-5.log
REM***rename C:\Temp\External-Shares-7.log External-Shares-6.log
REM***rename C:\Temp\External-Shares-8.log External-Shares-7.log
REM***rename C:\Temp\External-Shares-9.log External-Shares-8.log
REM***rename C:\Temp\External-Shares.log External-Shares-9.log
REM Shared Folders backed up and logs saved
REM
***end script***