Skip to main content

ATI backup regime implemented with batch files

Thread needs solution

Acronis True Image is a splendid disk imaging tool. I've used the product successfully for many years through many versions by following these rules:

1. Use ATI for imaging drives only.

2. Never use any feature of ATI except drive imaging.

3. Never use the fancy-schmancy stuff like Secure Zones, Try & Decide, job scheduler, encrypted images, auto delete, etc.

4. If it's not to do with plain old drive imaging, don't use it.

With the use of Acronis True Image Home, two carefully crafted batch files, a few highly regarded Windows utilities, and the Windows Task Scheduler, I have created an automated ATI backup regime of startling ingenuity and effectiveness. The batch files are presented below for your edification. They completely automate the backup regime for the system drive of my primary computer and utilize ATI to perform drive imaging only; no advanced features of ATI are employed -- everything other than drive imaging is done by reputable Windows utilities, paid and free.

In addition to creating a full image of the system drive, the weekly batch job also saves and then clears the Windows system, application, and security event logs; saves text file lists of all folders and files on the disk; saves a copy of the registry; runs the Windows disk cleanup utility to empty the recycle bin, delete temporary files, etc.; and defragments the drive with PerfectDisk.

Software

Windows 7 Ultimate 32-bit
Acronis True Image Home 11.0, Build 8,101
Second Copy 7.1
PerfectDisk 11 Professional
Various system utilities from Sysinternals
Windows Task Scheduler and other Windows utilities

Storage Hardware

5 hard drives: 3 internal (C: system drive; D:, E: backup drives); 1 external USB drive (L:); NAS device containing 1 hard drive, V:. The external USB drive is physically close to the computer; the NAS device is remote from it in another part of the house.

Backup Data Placement

ATI is used to image the system drive C: with the image files being placed on D:. Second Copy is used to copy selected files and folders on C: and the file copies are also placed on D:. Second Copy is also used to synchronize the backup drives, copying all backup files on D: (both drive images and file copies) to the other backup drives E:, L:, and V:. At the end of this synchronization process, the contents of D:, E:, L:, and V: are identical.

Backup Schedule

Weekly full and daily incremental imaging of C: using ATI, with rolling retention of 3 generations of weekly backups, each generation consisting of 1 full image file and 7 incremental image files.

Intermittent (3-hourly) file backups throughout the day of key data (documents, photos, emails, etc.) using Second Copy, implemented using the product's archive facility (stores latest version of a file and a user-configurable number of prior versions; I use 7).

The weekly batch file runs at midnight on Sunday, and the daily one at midnight on every other day.

Execution with Windows Task Scheduler

 The daily backup batch file is executed by the Windows Task Scheduler with the arguments:

>>D:\Temp\backup.log 2>&1

Note >> at start of command. This appends the redirected command output to an existing file, adding each day’s backup log to the end of the previous one.

The weekly backup batch file is executed by the Windows Task Scheduler with the arguments:

 >D:\Temp\backup.log 2>&1

Note only one > at start of command. This sends the redirected command output to a file after deleting its existing content, starting the backup log afresh every week.

The text file backup.log contains essentially a log of the week’s backup activities and can be interrogated at any time to ascertain the success or otherwise of an operation. Additionally, to record their activity, at key points the batch files write records to the Windows application event log.

Second Copy Configuration

In my installation of Second Copy, "Folder Backups" designates a set of individual backup jobs that copy certain key files and folders to D: "Backup Sync" designates a set of individual backup jobs that synchronize the backup drives so they are all identical.

Notes

In addition to the backups documented here I also run CrashPlan 3.0.3  which backs up key data to a friend's computer 30 miles away.

I access my primary computer almost exclusively through RDP from other computers, which is why the batch files begin by warning and then disconnecting any such users (only me, really).

Weekly Backup Batch File

@echo off

echo Starting weekly backup.
date /t
time /t
echo.

REM <<<<< TERMINATE THE SECOND COPY PROCESS. >>>>>
REM <<<<< SEE
HTTP://WWW.CENTERED.COM FOR SECOND COPY. >>>>>
echo Terminating Second Copy.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" /ExitWhenIdle
rem echo.

REM <<<<< DELETE THE SECOND COPY LOG FILE. >>>>>
echo Deleting Second Copy log file.
time /t
del /f /q "C:\Users\UserXXXX\AppData\Local\Centered Systems\Second Copy\log.rtf"
rem echo.

REM <<<<< DISCONNECT RDP USER AFTER SENDING A WARNING MESSAGE AND WAITING 1 MINUTE. >>>>>
REM <<<<< SEE
HTTP://PREVIEW.TINYURL.COM/4K28B FOR SLEEP UTILITY. >>>>>
msg 2 You will be logged off in 60 seconds.
sleep 60
tsdiscon 2

REM <<<<< TURN OFF NETWORK SHARE AUTODISCONNECT. >>>>>
net config server /autodisconnect:-1

REM <<<<< POINT TO ROOT OF C: DRIVE. >>>>>
cd /d C:\

REM <<<<< PROCESS IDLE TASKS AND WAIT 3 MINUTES. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Processing idle tasks." >nul
echo Processing idle tasks.
time /t
rundll32.exe advapi32.dll,ProcessIdleTasks
sleep 180
echo.

REM <<<<< CHANGE THE COMPUTER'S POWER PROFILE TO ENSURE UNINTERRUPTED EXECUTION OF THIS BACKUP. >>>>>
REM <<<<< THE PROFILE INVOKED SETS SLEEP MODE AND DISK TIMEOUTS TO NEVER. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/LIBRARY/CC748940(WS.10).ASPX FOR POWERCFG. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Changing power settings." >nul
echo Changing power settings.
time /t
powercfg -setactive af4eb9a2-333c-48d8-85fb-994075a62e92
echo.

REM <<<<< SAVE AND THEN CLEAR THE SYSTEM, APPLICATION, AND SECURITY EVENT LOGS. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897544.ASPX FOR PSLOGLIST. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Saving and clearing event logs." >nul
echo Saving and clearing event logs.
time /t
psloglist -c system > D:\Backups\Images\Gen_0\eventlog_system.txt
psloglist -c application > D:\Backups\Images\Gen_0\eventlog_application.txt
psloglist -c security > D:\Backups\Images\Gen_0\eventlog_security.txt
echo.

eventcreate /l application /t information /so WBKP /id 1 /d "Starting weekly backup." >nul

REM <<<<< TERMINATE OR SUSPEND SOME RUNNING PROCESSES TO FREE UP RESOURCES AND MINIMIZE WRITES TO C:. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897540.ASPX FOR PSSUSPEND. >>>>>
echo Terminating processes.
time /t
taskkill /im caps.exe /f
taskkill /im crashplanservice.exe /f
taskkill /im crashplantray.exe /f
taskkill /im evernote.exe /f
taskkill /im evernoteclipper.exe /f
taskkill /im evernotetray.exe /f
taskkill /im googletoolbarnotifier.exe /f
taskkill /im logmein.exe /f
taskkill /im pdagent.exe /f
taskkill /im photoshopelementsfileagent.exe /f
taskkill /im replayav.exe /f
pssuspend searchindexer.exe
echo.

REM <<<<< RUN ALL SECOND COPY FOLDER BACKUPS, CLOSING SECOND COPY WHEN FINISHED. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Running Second Copy folder backups." >nul
echo Running Second Copy folder backups.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" "Folder Backups" /ExitWhenIdle
echo.

REM <<<<< CREATE A LISTING OF ALL DIRECTORIES ON C:. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Creating C: directory listing." >nul
echo Creating C: directory listing.
time /t
tree C: > D:\Backups\Images\Gen_0\C_dirlist.txt
echo.

REM <<<<< CREATE A LISTING OF ALL FILES ON C:. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Creating C: file listing." >nul
echo Creating C: file listing.
time /t
dir C: /s /ogn /tc > D:\Backups\Images\Gen_0\C_filelist.txt
echo.

REM <<<<< RUN PSINFO SYSTEM INFORMATION UTILITY AND SAVE THE OUTPUT. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897550.ASPX FOR PSINFO. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Running system information utility." >nul
echo Running system information utility.
time /t
psinfo -d -h -s > D:\Backups\Images\Gen_0\system_info.txt
echo.

REM <<<<< SAVE A COPY OF THE REGISTRY AND WAIT 3 MINUTES. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Saving copy of registry." >nul
echo Saving copy of registry.
time /t
regedit /e /s D:\Backups\Images\Gen_0\registry.txt
sleep 180
echo.

REM <<<<< MAKE A TRUE IMAGE INCREMENTAL BACKUP OF THE C: DRIVE, THE FINAL BACKUP OF THE CURRENT WEEK. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Running True Image incremental backup." >nul
echo Running True Image incremental backup.
time /t
"C:\Program Files\Common Files\Acronis\TrueImageHome\TrueImageHomeService.exe" /script: "C:\ProgramData\Acronis\TrueImageHome\Scripts\6DB975D5-E259-48B8-AEAF-D3EE09A99AEC.tib.tis"
echo.

REM <<<<< WAKE THE NAS BOX AND WAIT 30 SECONDS. >>>>>
echo Waking NAS box.
time /t
net use V:
dir
\\D-LINKNAS\Volume_1 >nul
sleep 30
echo.

REM <<<<< SYNCHRONIZE THE BACKUP DRIVES, CLOSING SECOND COPY WHEN FINISHED. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Synchronizing backup drives." >nul
echo Synchronizing backup drives.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" "Backup Sync" /ExitWhenIdle
echo.

REM <<<<< WAKE THE NAS BOX AND WAIT 30 SECONDS. >>>>>
echo Waking NAS box.
time /t
net use V:
dir
\\D-LINKNAS\Volume_1 >nul
sleep 30
echo.

REM <<<<< WE KEEP 3 GENERATIONS OF BACKUPS, EACH GENERATION CONSISTING OF 1 WEEKLY FULL IMAGE AND 7 DAILY INCREMENTAL IMAGES: >>>>>
REM <<<<<    SON / GENERATION 0: THIS WEEK'S BACKUPS >>>>>
REM <<<<<    FATHER / GENERATION -1: LAST WEEK'S BACKUPS >>>>>
REM <<<<<    GRANDFATHER / GENERATION -2: THE WEEK BEFORE LAST'S BACKUPS >>>>>

REM <<<<< DELETE THE EXISTING GRANDFATHER. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Executing directory maintenance commands." >nul
echo Executing directory maintenance commands.
time /t
echo Deleting old grandfather.
rd /s /q D:\Backups\Images\Gen_Minus_2
time /t
rd /s /q E:\Backups\Images\Gen_Minus_2
time /t
rd /s /q L:\Backups\Images\Gen_Minus_2
time /t
rd /s /q
\\D-LINKNAS\Volume_1\Backups\Images\Gen_Minus_2
time /t

REM <<<<< MAKE THE EXISTING FATHER THE NEW GRANDFATHER. >>>>>
echo Converting father to grandfather.
move D:\Backups\Images\Gen_Minus_1 D:\Backups\Images\Gen_Minus_2
time /t
move E:\Backups\Images\Gen_Minus_1 E:\Backups\Images\Gen_Minus_2
time /t
move L:\Backups\Images\Gen_Minus_1 L:\Backups\Images\Gen_Minus_2
time /t
move
\\D-LINKNAS\Volume_1\Backups\Images\Gen_Minus_1\\D-LINKNAS\Volume_1\Backups\Images\Gen_Minus_2
time /t

REM <<<<< MAKE THE EXISTING SON THE NEW FATHER. >>>>>
echo Converting son to father.
move D:\Backups\Images\Gen_0 D:\Backups\Images\Gen_Minus_1
time /t
move E:\Backups\Images\Gen_0 E:\Backups\Images\Gen_Minus_1
time /t
move L:\Backups\Images\Gen_0 L:\Backups\Images\Gen_Minus_1
time /t
move
\\D-LINKNAS\Volume_1\Backups\Images\Gen_0\\D-LINKNAS\Volume_1\Backups\Images\Gen_Minus_1
time /t

REM <<<<< CREATE FOLDERS FOR THE NEW SON. >>>>>
echo Creating new son.
md D:\Backups\Images\Gen_0
time /t
md E:\Backups\Images\Gen_0
time /t
md L:\Backups\Images\Gen_0
time /t
md
\\D-LINKNAS\Volume_1\Backups\Images\Gen_0
time /t
echo.

REM <<<<< RUN THE WINDOWS DISK CLEANUP UTILITY. >>>>>
REM <<<<< SEE
HTTP://SUPPORT.MICROSOFT.COM/KB/315246 FOR THE DISK CLEANUP UTILITY. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Performing disk cleanup." >nul
echo Performing disk cleanup.
time /t
cleanmgr /sagerun:42
echo.

REM <<<<< DEFRAGMENT THE C: DRIVE WITH PERFECTDISK. >>>>>
REM <<<<< SEE
HTTP://WWW.PERFECTDISK.COM FOR PERFECTDISK. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Defragmenting C: with PerfectDisk." >nul
echo Defragmenting C: with PerfectDisk.
time /t
"C:\Program Files\PerfectDisk\PDCmd.exe" /SP /WAIT C:
echo.

REM <<<<< CREATE A LISTING OF ALL DIRECTORIES ON C:. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Creating C: directory listing." >nul
echo Creating C: directory listing.
time /t
tree C: > D:\Backups\Images\Gen_0\C_dirlist.txt
echo.

REM <<<<< CREATE A LISTING OF ALL FILES ON C:. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Creating C: file listing." >nul
echo Creating C: file listing.
time /t
dir C: /s /ogn /tc > D:\Backups\Images\Gen_0\C_filelist.txt
echo.

REM <<<<< RUN PSINFO SYSTEM INFORMATION UTILITY AND SAVE THE OUTPUT. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897550.ASPX FOR PSINFO. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Running system information utility." >nul
echo Running system information utility.
time /t
psinfo -d -h -s > D:\Backups\Images\Gen_0\system_info.txt
echo.

REM <<<<< SAVE A COPY OF THE REGISTRY AND WAIT 3 MINUTES. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Saving copy of registry." >nul
echo Saving copy of registry.
time /t
regedit /e /s D:\Backups\Images\Gen_0\registry.txt
sleep 180
echo.

REM <<<<< MAKE A TRUE IMAGE FULL BACKUP OF THE C: DRIVE, THE FIRST BACKUP OF THE NEW WEEK. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Running True Image full backup." >nul
echo Running True Image full backup.
time /t
"C:\Program Files\Common Files\Acronis\TrueImageHome\TrueImageHomeService.exe" /script: "C:\ProgramData\Acronis\TrueImageHome\Scripts\5D819378-66CC-4D5E-87F5-084AD40FFFFA.tib.tis"
echo.

REM <<<<< WAKE THE NAS BOX AND WAIT 30 SECONDS. >>>>>
echo Waking NAS box.
time /t
net use V:
dir
\\D-LINKNAS\Volume_1 >nul
sleep 30
echo.

REM <<<<< SYNCHRONIZE THE BACKUP DRIVES. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Synchronizing backup drives." >nul
echo Synchronizing backup drives.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" "Backup Sync" /ExitWhenIdle
echo.

REM <<<<< UNSUSPEND THE WINDOWS SEARCH INDEXER. >>>>>
echo Unsuspending search indexer.
time /t
pssuspend -r searchindexer.exe
echo.

REM <<<<< RUN SYNC UTILITY TO FLUSH DISK BUFFERS. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897438.ASPX FOR SYNC. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Flushing local disk buffers." >nul
echo Flushing local disk buffers.
time /t
sync
echo.

REM <<<<< RESTORE THE COMPUTER'S ORIGINAL POWER PROFILE. >>>>>
REM <<<<< THE PROFILE INVOKED SETS SLEEP MODE AND DISK TIMEOUTS TO 15 MINUTES. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/LIBRARY/CC748940(WS.10).ASPX FOR POWERCFG. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Restoring power settings." >nul
echo Restoring power settings.
time /t
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e
echo.

REM <<<<< SHUT DOWN THE COMPUTER. >>>>>
eventcreate /l application /t information /so WBKP /id 1 /d "Shutting down the computer." >nul
echo Shutting down the computer.
date /t
time /t
echo.
echo *****************************************************************************************************************************
echo *****************************************************************************************************************************
echo.
shutdown -s -f -t 00

Daily Backup Batch File

@echo off

REM <<<<< WRITE A MESSAGE TO THE EVENT LOG. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Starting daily backup." >nul

echo Starting daily backup.
date /t
time /t
echo.

REM <<<<< TERMINATE THE SECOND COPY PROCESS. >>>>>
REM <<<<< SEE
HTTP://WWW.CENTERED.COM FOR SECOND COPY. >>>>>
echo Terminating Second Copy.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" /ExitWhenIdle
echo.

REM <<<<< DISCONNECT RDP USER AFTER SENDING A WARNING MESSAGE AND WAITING 1 MINUTE. >>>>>
REM <<<<< SEE
HTTP://PREVIEW.TINYURL.COM/4K28B FOR SLEEP UTILITY. >>>>>
msg 2 You will be logged off in 60 seconds.
sleep 60
tsdiscon 2

REM <<<<< TURN OFF NETWORK SHARE AUTODISCONNECT. >>>>>
net config server /autodisconnect:-1

REM <<<<< POINT TO ROOT OF C: DRIVE. >>>>>
cd /d C:\

REM <<<<< PROCESS IDLE TASKS AND WAIT 3 MINUTES. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Processing idle tasks." >nul
echo Processing idle tasks.
time /t
rundll32.exe advapi32.dll,ProcessIdleTasks
sleep 180
echo.

REM <<<<< CHANGE THE COMPUTER'S POWER PROFILE TO ENSURE UNINTERRUPTED EXECUTION OF THIS BACKUP. >>>>>
REM <<<<< THE PROFILE INVOKED SETS SLEEP MODE AND DISK TIMEOUTS TO NEVER. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/LIBRARY/CC748940(WS.10).ASPX FOR POWERCFG. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Changing power settings." >nul
echo Changing power settings.
time /t
powercfg -setactive af4eb9a2-333c-48d8-85fb-994075a62e92
echo.

REM <<<<< TERMINATE OR SUSPEND SOME RUNNING PROCESSES TO FREE UP RESOURCES AND MINIMIZE WRITES TO C:. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897540.ASPX FOR PSSUSPEND. >>>>>
echo Terminating processes.
time /t
taskkill /im caps.exe /f
taskkill /im crashplanservice.exe /f
taskkill /im crashplantray.exe /f
taskkill /im evernote.exe /f
taskkill /im evernoteclipper.exe /f
taskkill /im evernotetray.exe /f
taskkill /im googletoolbarnotifier.exe /f
taskkill /im logmein.exe /f
taskkill /im pdagent.exe /f
taskkill /im photoshopelementsfileagent.exe /f
taskkill /im replayav.exe /f
pssuspend searchindexer.exe
echo.

REM <<<<< RUN ALL SECOND COPY FOLDER BACKUPS, CLOSING SECOND COPY WHEN FINISHED. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Running Second Copy folder backups." >nul
echo Running Second Copy folder backups.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" "Folder Backups" /ExitWhenIdle
echo.

REM <<<<< CREATE A LISTING OF ALL DIRECTORIES ON C:. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Creating C: directory listing." >nul
echo Creating C: directory listing.
time /t
tree C: > D:\Backups\Images\Gen_0\C_dirlist.txt
echo.

REM <<<<< CREATE A LISTING OF ALL FILES ON C:. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Creating C: file listing." >nul
echo Creating C: file listing.
time /t
dir C: /s /ogn /tc > D:\Backups\Images\Gen_0\C_filelist.txt
echo.

REM <<<<< RUN PSINFO SYSTEM INFORMATION UTILITY AND SAVE THE OUTPUT. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897550.ASPX FOR PSINFO. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Running system information utility." >nul
echo Running system information utility.
time /t
psinfo -d -h -s > D:\Backups\Images\Gen_0\system_info.txt
echo.

REM <<<<< SAVE A COPY OF THE REGISTRY AND WAIT 3 MINUTES. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Saving copy of registry." >nul
echo Saving copy of registry.
time /t
regedit /e /s D:\Backups\Images\Gen_0\registry.txt
sleep 180
echo.

REM <<<<< MAKE A TRUE IMAGE INCREMENTAL BACKUP OF THE C: DRIVE. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Running True Image incremental backup." >nul
echo Running True Image incremental backup.
time /t
"C:\Program Files\Common Files\Acronis\TrueImageHome\TrueImageHomeService.exe" /script: "C:\ProgramData\Acronis\TrueImageHome\Scripts\6DB975D5-E259-48B8-AEAF-D3EE09A99AEC.tib.tis"
echo.

REM <<<<< WAKE THE NAS BOX AND WAIT 30 SECONDS. >>>>>
echo Waking NAS box.
time /t
net use V:
dir
\\D-LINKNAS\Volume_1 >nul
sleep 30
echo.

REM <<<<< SYNCHRONIZE THE BACKUP DRIVES, CLOSING SECOND COPY WHEN FINISHED. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Synchronizing backup drives." >nul
echo Synchronizing backup drives.
time /t
"C:\Program Files\Second Copy\SecCopy.exe" "Backup Sync" /ExitWhenIdle
echo.

REM <<<<< UNSUSPEND THE WINDOWS SEARCH INDEXER. >>>>>
echo Unsuspending search indexer.
time /t
pssuspend -r searchindexer.exe
echo.

REM <<<<< RUN SYNC UTILITY TO FLUSH DISK BUFFERS. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/SYSINTERNALS/BB897438.ASPX FOR SYNC. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Flushing local disk buffers." >nul
echo Flushing local disk buffers.
time /t
sync
echo.

REM <<<<< RESTORE THE COMPUTER'S ORIGINAL POWER PROFILE. >>>>>
REM <<<<< THE PROFILE INVOKED SETS SLEEP MODE AND DISK TIMEOUTS TO 15 MINUTES. >>>>>
REM <<<<< SEE
HTTP://TECHNET.MICROSOFT.COM/EN-US/LIBRARY/CC748940(WS.10).ASPX FOR POWERCFG. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Restoring power settings." >nul
echo Restoring power settings.
time /t
powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e
echo.

REM <<<<< SHUT DOWN THE COMPUTER. >>>>>
eventcreate /l application /t information /so DBKP /id 1 /d "Shutting down the computer." >nul
echo Shutting down the computer.
date /t
time /t
echo *****************************************************************************************************************************
echo *****************************************************************************************************************************
echo.
shutdown -s -f -t 00

0 Users found this helpful