I am trying it now, but for some reason, it has ignored $disk. The rest is working. It has popped up 2 command prompts. One is blank. And the command prompt windows are not starting minimized.
Here is what I added to my previously posted script. Code: @echo off CD /d %~dp0 if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF snapshot64.exe HD1:* "D:\System_Backup\Drive_Snapshot\$disk-$date-$hour-$minute-$second.sna" -o -L0 --UseVSS exit
I was wrong about $disk. It does show. It has never shown HD1 on of the SNA files for some reason. I was looking at that one. But I don't know why I am getting 2 command prompt windows. The old script just displays 1, and it is minimized.
I used "your" script (3 partitions on SSD) and all was OK. Only one minimized command window. Did you run the script as Admin? Code: @echo off CD /d %~dp0 if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF snapshot64.exe HD3:* "E:\ds\$DISK-$DATE-$hour-$minute-$second.sna" -o -L0 --UseVSS exit One of my images was... H-191229-11-52-15.sna
As a test I manually backed up a test UEFI system with DS. DS HD1 (a SSD) contained 7 partitions. This was Disk 0 in Windows Disk Management.. MSR 16 MiB ESP 400 MiB Win10 20000 MiB RE 828 MiB Win 7 20000 MiB IFL 150 MiB Linux Mint 19.2 12000 MiB The ESP contained BIU (BootIt UEFI) which booted the four OS. 7 .sna images were created. The SSD was wiped with Linux Discard, Unsecure Trim. All partitions were seen to be deleted and the SSD was entirely Free Space. A manual DS restore was performed from a WinPE. Selected "Restore complete Disk from Images" Browsed to the images. You can choose any of the 7 images. Now all 7 images appear in DS "Select the image file". Disk to restore to... HD1 Leave tick in "Restore the partition structure" Continued on Success Restore time was 7:11 (min:sec). Win10 booted normally BIU needed to be manually reinstalled and all OS booted. An IFL restore takes 1:52 and BIU doesn't need to be manually reinstalled. IFL is fast.
DS hasn't failed me yet. And it's so light. Good German quality. If only some smart person could find a way to purge old backups like Reflect and Image For Windows IFWRotate does. It would save me monitoring and manually deleting backups on the wife's computer.
This works. It saves the 3 most recent images but this can be edited... Code: @echo off CD /d %~dp0 if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF snapshot64.exe HD3:* "D:\ds\$DISK-$DATE-$hour-$minute-$second.sna" -o -L0 -R --UseVSS -W MD hadron MOVE *.sna hadron IF EXIST Entire-3 (RD Entire-3 /s /q) IF EXIST Entire-2 (REN Entire-2 Entire-3) IF EXIST Entire-1 (REN Entire-1 Entire-2) REN hadron Entire-1 Entire-1 contains the most recent image.
Thanks, Brian. I'll test to see exactly what it does now. I see that you also have -R and -W. I know -R empties the Recycle Bin and -W suppresses <Hit Any Key> if started from Scheduler. I have never had to suppress <Hit Any Key> if started when Scheduler.
Hadron, I haven't had to use -W before but after the snapshot64 line ran I saw <Hit Any Key>. I don't know why. I can make a backup in just over 10 seconds as I'm imaging empty partitions. So I can run these tests quickly and I like this script. How many DS images would you like the script to keep?
I understand why you used the -W now. It's could for me to see that backup was a success. I have finished testing, but it didn't make directories, move or rename anything. It just created a backup as usual. Where in the script does it delete old backups? I think maybe 5 backups would be good.
This works for 5 backups... Code: IF EXIST Entire-5 (RD Entire-5 /s /q) IF EXIST Entire-4 (REN Entire-4 Entire-5) IF EXIST Entire-3 (REN Entire-3 Entire-4) IF EXIST Entire-2 (REN Entire-2 Entire-3) IF EXIST Entire-1 (REN Entire-1 Entire-2) REN hadron Entire-1
The only thing I changed was replace hadron with Backup. Code: @echo off CD /d %~dp0 if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF snapshot64.exe HD1:* "D:\System_Backup\Drive_Snapshot\$disk-$date-$hour-$minute-$second.sna" -o -L0 --UseVSS MD Backup MOVE *.sna Backup IF EXIST Entire-3 (RD Entire-3 /s /q) IF EXIST Entire-2 (REN Entire-2 Entire-3) IF EXIST Entire-1 (REN Entire-1 Entire-2) REN Backup Entire-1