Sei sulla pagina 1di 13

Windows Backup Manual Test Cookbook

Last updated: 4/14/2009

10:37 PM

Overview ....................................................................................................................................................... 2 WSB Manual Tests (As per Sub Areas listed in WTT) ................................................................................ 2 WCB Manual Tests (As per Sub Areas listed in WTT)................................................................................ 3 ASR Manual Tests...................................................................................................................................... 3 Glossary ......................................................................................................................................................... 3 Lab Infrastructure ......................................................................................................................................... 4 Network Diagram ...................................................................................................................................... 4 Common Configuration/Provisioning ....................................................................................................... 4 Resources .................................................................................................................................................. 4 Hardware Requirements ........................................................................................................................... 4 Software Requirements ................................................................................................................................ 5 Test Tools/Methods .................................................................................................................................. 5 BitLocker ............................................................................................................................................... 5 Disk Management MMC ....................................................................................................................... 5 Diskpart Command ............................................................................................................................... 6 Simbad Tool .......................................................................................................................................... 6 Group Policy Editor (GPEDIT.MSC)........................................................................................................ 6 DVD Test Hook ...................................................................................................................................... 6 HE Tool .................................................................................................................................................. 7 SFPCopy................................................................................................................................................. 7 ICALCS Tool ........................................................................................................................................... 7 MkLink ................................................................................................................................................... 7 Attrib ..................................................................................................................................................... 7 Other Inbox Tools.................................................................................................................................. 8 Other Tools Usage Info required in execution of Manual tests ............................................................ 8 How to make a volume critical in Client ........................................................................................... 8 How to make a volume critical in Server .......................................................................................... 9

Using the Vshadow.exe and Vssadmin utility ............................................................................ 9 How to collect VSS traces................................................................................................................ 10 How to simulate disk failure ........................................................................................................... 10 Test hook for disable and enable system writer ............................................................................. 10 To separate system volume and boot volume................................................................................ 11 How to make the volume dirty ....................................................................................................... 11 Prerequisite knowledge .............................................................................................................................. 11 Specific Component knowledge ................................................................................................................. 11 Windows Backup Diagnostic Information............................................................................................... 11 Diagnosing Backup Failures ........................................................................................................................ 12 WBDiag Tracing Tool ............................................................................................................................... 12 Log Parsing Tool ...................................................................................................................................... 12 File System Concepts .................................................................................................................................. 12 ACLs ........................................................................................................................................................ 12 File Attributes.......................................................................................................................................... 12 Reparse Point .......................................................................................................................................... 13 VHD ......................................................................................................................................................... 13

Overview
High-level overview of the manual cases, for example the bucket of manual test and its priority (IDX/FTP). WTT jobs for manual tests of Windows Backup(Windows Server Backup(WSB) as well as Windows Client Backup(WCB)) are present in LHSB datastore under $\WIN7\Server-SSD\Data Lifecycle Mgmt path. Following paths are of interest:1. WSB Manual Tests WTT Jobs --$\WIN7\Server-SSD\Data Lifecycle Mgmt\Server Backup\Tests 2. WCB Manual Tests WTT Job--$\WIN7\Server-SSD\Data Lifecycle Mgmt\Client Backup\Tests 3. ASR Manual Tests WTT Jobs--$\WIN7\Server-SSD\Data Lifecycle Mgmt\ASR\Tests

WSB Manual Tests (As per Sub Areas listed in WTT)


Features/Sub Areas Bare Metal Recovery BLB Engine Command Line User Interface # of test cases 3 40 6 7 Priority IDX IDX IDX IDX Comments P1 tests P1 tests P1 tests P1 tests

Command Line BLB Engine Bare Metal Recovery User Interface Setup Total

104 212 9 92 6 479(56 IDX + 423 Others)

Once per milestone Once per milestone Once per milestone Once per milestone Once per milestone

P2 tests P2 tests P2 tests P2 tests P2 tests

WCB Manual Tests (As per Sub Areas listed in WTT)


Features/Sub Areas Complete PC Backup Safedocs System Restore Complete PC Backup Safedocs System Restore Total # of test cases 21 133 19 32 249 50 504 (173 IDX + 331 Others) Priority IDX IDX IDX Once per milestone Once per milestone Once per milestone Comments 9 P0 + 12 P1 tests 12 P0 + 121 P1 tests 2 P0 + 17 P1 tests P2 tests P2 tests P2 tests

ASR Manual Tests


Features/Sub Areas ASR ASR # of test cases 1 1 Priority IDX Once per milestone Comments 1 P1 test 1 P2 test

Glossary
List the abbreviations, terms and definitions that are used in WTT job descriptions Term ASR BMR FLB BLB WCB WSB WBToolsShare blbtest VHD .. Explanation Automated System Recovery[Basic feature providing disk information backup/recovery] Bare Metal Recovery [Backup feature built on top of ASR to provide full system recovery from disk crash] File Level Backup Block Level Backup Windows Client Backup (referring to Vista/Win7 Backup) Windows Server Backup Windows Backup tools share. Windows Backup Test installation Directory. Resides on %SystemDrive%. Contains most of the test tools/automation. Virtual Hard Disk

Lab Infrastructure
Network Diagram
Since Windows Backup is a one node solution, no special setup is required for manual testing (apart from test specific hardware requirements).

Common Configuration/Provisioning
Following basic configuration is required before running the test. 1. Install Backup Features on the test machine. 2. Install test tools on the test machines. Refer Guide on WSB Manual Tests Execution for more details.

Resources
WCB and WSB manual test execution guides will help tester to get to speed on features in WSB and WCB to run manual tests. It gives brief overview about the backup design, UI, and test installation. It is highly suggested that you go through these documents before continuing. Following set of documents are required for understanding backup feature and different testing aspects. 1. Basic documentation on specific features [MUST READ] a. Guide on WSB Manual Test Execution b. WCB How to For Manual Test Execution 2. Test specific deployment guides a. How to run WSB tests on ISCSI Disks b. How to Setup Active Directory c. How to Setup Cluster Service Besides above general information documents, each manual test case in WTT provides required details for manual execution. Apart from the documents backup testing would require certain tools which will be shared with you in a network share [WBToolsDirectory]

Hardware Requirements
Hardware Most of the WSB tests need one Windows Server 2008 R2 machine with one disk free (internal or external based on test). Some tests require multi-machine (mostly 2 machines). Exact requirements are mentioned in each test in WTT in LHSB datastore under $\WIN7\Server-SSD\Data Lifecycle Mgmt\Server Backup path

Most of the WCB tests need Windows 7 Machine with one free disk. Exact requirement is mentioned in each test in WTT in LHSB datastore under $\WIN7\Server-SSD\Data Lifecycle Mgmt\Client Backup\Tests path.

Special hardware/device External Disks Removable Media based Device Prostor DVD Drive and Media Shared storage (ISCSI) for Cluster testing

Other specific hardware requirements are mentioned in WTT jobs.

Software Requirements
Below is the list of tools used for testing Windows Backup.

Test Tools/Methods
BitLocker a) Install BitLocker from Server Manager UI. b) Reboot machine c) Sample command to bitlock volume X: manage-bde -on X: -RecoveryPassword -Recoverykey Y:\ d) Sample command to unlock volume X: manage-bde -unlock X: -RecoveryKey Y:\aaa.bek Disk Management MMC a) For attaching/detaching virtual disks Use Action->Attach VHD. b) For creating/deleting volumes i) For creating a new volume, right click on the disk and click New Simple Volumej ii) For creating a dynamic volume, right click on the disk and click New Spanned Volume or New Mirrored Volume or New Striped Volume or New RAID-5 Volume iii) For deleting a volume, right click on the volume and click delete. c) By default, a disk is a basic disk. For converting a disk to dynamic, select a disk, right click on the disk and click Convert to Dynamic Disk. For converting it back to basic, you will have to delete all volumes on it. Then, right click on the disk and click Convert to Basic Disk

Diskpart Command Type diskpart.exe and type help. You can see all commands supported by Diskpart. We use diskpart for performing following actions:a) For creating/attaching/detaching virtual disks (use Create, Attach, Detach commands) b) For creating, getting list of volumes, deleting volumes (use Create, List, Delete commands) c) For removing/assigning drive letters a volume (use Assign, Remove commands) d) For setting attributes to a volume e.g., hidden attribute for making a volume hidden. (use Attributes command) Simbad Tool This tool is needed to insert bad sectors in files and test backup/recovery. After installing blbtest, you can run InstallSimBad.cmd /I <TestBinRoot> for installing Simbad on your machine. a) Enable Simbad.exe on hard disk - Simbad /e /h <diskNumber> e.g. Simbad /e /h 0 b) Create bad clusters on file - Simbad <filename> /s <sectorNumber> e.g. Simbad D:\FOO\xyz.txt /s 0 c) To verify if bad clusters are present - Open the file and check if it errors e.g. On elevated command prompt, run Type D:\FOO\xyz.txt Data Error (Cyclic Redundancy Check) d) Clear bad sector on hard disk - Simbad /c /h <diskNumber> e.g. Simbad /c /h 0

Group Policy Editor (GPEDIT.MSC) a) Open GPEdit.msc b) Go to UserConfiguration->Administrative Templates ->Windows Components ->Backup>Client c) There are 7 backup/restore policies listed under above path. Edit these policies as per your test requirements. DVD Test Hook DvdTestHook.exe is part of blbtest(Windows Server Backup Test) installation. Running this command will set a registry key for simulating DVD spanning scenario with only one DVD. This hook sets n MBs as DVD full capacity. Sample Run:- DVDTestHook.exe add 100.

Above command will set DVD full capacity as 100 MB. That means, after writing 100 MB of data on a DVD, backup reports DVD as full and asks for new DVD insertion. In automated tests, we use same DVD instead of inserting new DVD after copying DVD contents to other location. In manual tests, this hook is used for DVD spanning scenarios. He Tool He is a tool for corrupting VHD files. Available at [WTT\OSBinRoot]\idw SFPCopy sfpcopy is an idw tool for overwriting system files. Available at [WTT\OSBinRoot]\idw ICALCS Tool ICALCS.exe is inbox tool for looking at ACL of any folder/file and setting ACLs also. This is used for verifying ACLs on any file MkLink MkLink.exe command can be used for creating reparse points. MKLINK [[/D] | [/H] | [/J]] Link Target

/D /H /J

Creates a directory symbolic link. Default is a file symbolic link. Creates a hard link instead of a symbolic link. Creates a Directory Junction.

Link specifies the new symbolic link name. Target specifies the path (relative or absolute) that the new link refers to

Sample steps for creation of a hardlink which is a kind of reparse point. Below we have created a new file 1.txt of length 1024. And, then we created a hardlink named 2.txt for it and verified that hardlink successfully got created.
1. 2. 3. Fsutil file create new 1.txt 1024 Mklink /h 2.txt 1.txt Verified that hardlink got created by listing them using fsutil hardlink list 1.txt command

Attrib Attrib.exe command can be used to display and change file attributes Usage:-

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I] [drive:][path][filename] [/S [/D] [/L]] + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. I Not content indexed file attribute. [drive:][path][filename] Specifies a file or files for attrib to process. /S Processes matching files in the current folder and all subfolders. /D Processes folders as well. /L Work on the attributes of the Symbolic Link versus the target of the Symbolic Link Other Inbox Tools For sparse: fsutil.exe sparse. You can check other commands of fsutil.exe by running fsutil.exe /? For reparse and hardlink : mklink.exe For Compression: Compact.exe For Encryption: cipher.exe Other Tools Usage Info required in execution of Manual tests How to make a volume critical in Client 1) Install blbtest. Make sure blbtestutil.exe is present in \blbtest directory. 2) Create a new volume that you want to treat as a Critical volume. E.g. (H:) 3) Create a temp dir in H:. H:\Test. 4) Create a temp file in H:\Test\Test.exe 5) Open Cmd prompt. 6) cd \blbtest

7) 8) 9) 10)

Stop wbengine server using net stop wbengine. blbtestutil.exe operation installsvc filepath h:\test\test.exe svcname <testsvcname> This installs a service with the specified binary path and hence the volume becomes critical. Verify using: wbadmin start backup allcritical backuptarget:<X>:. This command will show the list of critical volumes in your system. 11) You can also use Adhoc CPCUI to check the list of critical volumes. How to make a volume critical in Server 1) Install blbtest. Make sure blbtestwriter.exe is present in \blbtest directory. 2) Create a new volume that you want to treat as a Critical volume. E.g. (H:) 3) Create a temp dir in H:. H:\Test. 4) Create a temp file in H:\Test\Test.txt 5) Open Cmd prompt. 6) cd \blbtest 7) Create a new file: \blbtest\filespec.txt. Write H:\Test\|*|y| to filespec.txt 8) Stop wbengine server using net stop wbengine. 9) Start blbtestwriter.exe and pass the filename as argument. E.g. blbtestwriter.exe filespec.txt. 10) Blbtestwriter.exe will now point a System writer file in the new drive and it will become critical. 11) Verify using: wbadmin start backup allcritical backuptarget:<X>:. This command will show the list of critical volumes in your system. 12) You can also use Adhoc CPCUI to check the list of critical volumes.

Using the Vshadow.exe and Vssadmin utility, Shadow copy of any specific volume can be deleted in the middle of the backup, at the time of shadow copy creation. On elevated command prompt, run Vssadmin list shadows. It will list out the shadow copy of the volumes. To delete a shadow copy of specific volume, Go to cd %systemdrive%\blbtest. Run Vshadow -ds={<Snapshot Id of specific volume listed on Vssadmin list shadows output>} To delete all shadows copy of all the volumes or available in the systemRun Vshadow da To know more about Vshadow utility, see the help.

The Vssagent.exe is a good tool for collecting VSS diagnostics information. It collects information related to VSS, SPP and writers and puts it into an .xml file that can be viewed using vsdiagview.exe. Both of these tools are available under the [WTT\OSBinRoot]\Vsstools. VSS logs some Enter/Leave traces for different events sent to the writers in the registry under HKLM\System\CurrentControlSet\Services\VSS.

These logs can be useful in the scenarios when a writer is hung and no other tool would inform about the list of writers and their state. The following commands can be used for collecting the diagnostics using vssagent: VSSAGENT -setparam GatherDataFlags 253 VSSAGENT -gather vssdiag.xml VSSAGENT -setparam GatherDataFlags 0 The above command would create vssdiag.xml that can be viewed using vsdiagview.exe.

How to collect VSS traces Please follow the following instructions to get vss traces if in case there are any vss related issues: 1. Start the tracing in an elevated command prompt: [WTT\OSBinRoot]\Vsstools\generate_vss_reports.cmd 2. Repro in another shell/UI 3. Stop the tracing by pressing enter in the original command shell Pack the vssdiag root of the volume and send to vssclub

How to simulate disk failure 1. Pre-requisite : Machine should have WTT installed. 2. For simulating failure on disk: copy [WTT\TestBinRoot]\NTTEST\BASETEST\Diagnosibility\DFD to locally. 3. Install the driver using rundll32 setupapi.dll,InstallHinfSection,131,DiskFailureFilter.inf or right click on DiskFailureFilter.inf file and click on install. Then reboot the system. 4. After the system has rebooted, go to the path where you have copied DFD dir and run DFDTESTS 0 6 (Injecting failure into disk 0). 5. To turn off injection run DFDTESTS 0 7. 6. Run backup on the disk in which injected the simulation. 7. Backup will fail and action center will show yellow color message Backup disk is about to fail. Test hook for disable and enable system writer 1. Install test 2. Go to <systemvol>\blbtest 3. To disable system writer run DisableSystemWriterForSSR_SSB.reg 4. To enable system writer, run EnableSystemWriterForSSR_SSB.reg

To separate system volume and boot volume 1. Install test 2. Go to <systemvol>\blbtest 3. Run PrepareMachineForBitlocker.exe and reboot the machine How to make the volume dirty 1. Run fsutil dirty set <driveletterofvolume> 2. To make the volume back to normal state, run chkdisk.

Prerequisite knowledge
Assume common knowledge is mastered by WinSE on-site vendors. For example: . OS deployment . DC Setup . Hyper-v setup . BitLocker . Network configuration on test machine (IPv4/v6. Dynamic/static IP addresses, Gateway. DNS WINS, etc) .Basic knowledge about Windows Backup and Storage Technology

Specific Component knowledge


All the specific component knowledge has been captured in the different documents referred in Resources

Windows Backup Diagnostic Information


Windows Backup log files(ETL format) are present in %windir%\Logs\WindowsBackup directory. System Restore log files are put in %windir%\Logs\SystemRestore directory. You can use Log Parsing Tool for parsing the logs.

Appendix
Diagnosing Backup Failures
WBDiag Tracing Tool
Wbdiag.exe is part of WSB test install. a) Run Wbdiag.exe mode on b) Run your scenario (any backup/recovery) c) Run Wbdiag.exe mode off -p \\MachineName\Symbols\TraceFormat Above command will generate product traces in ETL format which can be trace formatted using tracefmt.exe explained below.

Log Parsing Tool


We use tracefmt.exe tool for trace formatting the backup traces. Its present in test installation. Usage of it is:Tracefmt.exe <ETL File> -o <Output Text File> -p <Symbols Path> Example Usage:tracefmt.exe C:\Windows\Logs\WindowsBackup\WindowsBackup.1.etl -o C:\WindowsBackupLogs.txt -p \\winbuilds\release\india\win7_rtm\7600.16385.0907131255\amd64fre\symbols.pri\TraceFormat

File System Concepts


ACLs
An Access Control List (ACL) is a list of permissions attached to an object. An ACL specifies which users-or system processes--are granted access to objects, as well as what operations are allowed to be performed on given objects. In a typical ACL, each entry in the list specifies a subject and an operation (e.g. the entry (Alice, delete) on the ACL for file WXY gives Alice permission to delete file WXY). You can use ICALCS.exe command to view/change ACLs. This tool is inbuilt into the OS.

File Attributes
File attributes can be used to write-protect, hide, and unhide files, or as behind-the-scenes file maintenance:
Read-only: Can be read, but not changed or deleted Hidden: By default do not appear in a directory listing Archive: Use to selectively back up or copy files; most helpful in DOS

System: Flagged for use by the operating system; not usually displayed in a directory listing

File Attributes can be set/verified by using Attrib.exe tool mentioned in tools section

Reparse Point
Reparse points are used to implement NTFS file system links. They can be created using MkLink.exe command. Reparse Points can be created using mklink.exe mentioned in tools section

VHD
A Virtual Hard Disk (VHD) is a file formatted to be structurally identical to a physical Hard Disk Drive VHD can be created/deleted/mounted by using DiskMgmt.msc and Diskpart.exe

Potrebbero piacerti anche