This line... Code: if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF ... makes the command window run minimized. It's on the taskbar if you want to see it. If you don't want it to run minimized, use this... Code: ::if not defined RunTask set RunTask=1 & start "Snapshot" /min %SystemRoot%\system32\cmd.exe /c "%0" & goto :EOF
The latest diff script produces files such as... H-diff-182934 My earlier script with the custom date format produced... H-diff-2020-Jul-14_182719 The first file is fine (latest script).
Thanks Brian for your efforts here! I will give DS, and the scripts, as soon as I get a gap. Wrt the (new) files like H-diff-182934, the creation date will still be visible in file properties or whatever?
Sure. You don't need date or time in the filename. It was a way of creating a unique name so the next run of the script didn't delete the previous diff. I could have created diff1, diff2, diff3, etc. But I don't know how to do that. And you can't rename the diff after it has been created. DS doesn't like that and won't restore the image.
If you are running the script from a Scheduled Task there is a good chance your timestamp could be the same as a previous timestamp. The previous .sna backup will be over-written. I suggest date is included in the filename as a precaution. Code: set hh=%time:~0,2% if "%time:~0,1%"==" " set hh=0%hh:~1,1% set timestamp=%time:~0,8% if @%timestamp:~0,1% == @ set timestamp=0%timestamp:~1,7% set timestamp=%date:.=%_%timestamp::=% echo.Timestamp :: %timestamp% For this, use the ISO 8601 date format.
Hadron, if you are still using / format, change your line to this... snapshot64.exe HD1:* "%DSpath%\Entire-1\$disk-diff-%timestamp%-%random%.sna" -h"%DSpath%\Entire-1\$disk.hsh" -R -L0 --UseVSS -W It adds a random number to the image filename. That makes it pretty safe from having the same filename in a Scheduled Task situation. Edit... You know what to do if your line doesn't have %DSpath%
I am not sure what you are suggesting with your edit above, Brian. I am using this at present. Code: snapshot64.exe HD1:* "D:\System_Backup\Drive_Snapshot\$disk.sna" -L0 --UseVSS -W Code: Snapshot V1.48 - Jun 10 2020 - Copyright 2001-2019 by www.drivesnapshot.de [backup a volume] Snapshot C: X:\C-DRIVE.sna -A - save ALL sectors, ignore free cluster info (maintenance) -L650 - Limit resulting imagesize to 650MB (CDROM size) -T - Test generated image file (verify correct checksums) -W - suppress <Hit any key> if started from scheduler -R - Empty Recycle Bin for this drive before Backup -G - Graphical status display for command line mode -PW=MyPassword (also used for restore and viewing) -PWGEN=KeyFile.txt -PW=MyPassword - generate a key file from password -PWUSE=KeyFile.txt - use KeyFile.txt to encrypt the image -C="My comment" add a comment to the image -o[path][filename] generate hash file with name "path\filename" -o - don't generate hash file -h<HashFile> make a differential image [backup multiple volumes and drives without drive letters] Snapshot C:+D:+HD1:3 X:\$disk-DRIVE.sna HD1:3 is the third partition on the first disk HD1:* can be used to backup all partitions on the first disk Options for command line substitutions Possible values for substitution are: $disk is substituted with the drive letter $hd is substituted with HdX-Y $date results in 050131 which represents January 31 2005 $computername is substituted with the computername $type results in "dif" or "ful" for differential or full image $weekday is substituted with the first two characters of the Weekday $week is substituted with the calendar week (2digits) $year is substituted with the year (4 digits) $month is substituted with the month (2 digits) $day is substituted with the day of the month (2 digits) $hour is substituted with the hour $minute is substituted with the minute $second is substituted with the second $label= is substituted with the volume with label=Name [restore a volume] Snapshot X:\C-DRIVE.sna C: -Y - Answers all questions automatically with "Yes" [view a saved file] Snapshot X:\C.sna Z: -V explores X:\C.sna as virtual drive Z: (-VM for mount only) (-VQ for mount only and wait for event. Use --unmount to terminate) [generate a new hash file from a full image] Snapshot X:\C.sna -h<HashFileName> [info about a file] Snapshot X:\C-DRIVE.sna -I [partition info ] Snapshot X:\C-DRIVE.sna -P [validate file ] Snapshot X:\C-DRIVE.sna -T
Hadron, A potential problem is with images made from Scheduled Tasks. Let's say your Task is set for 7 am. the backup image filename could be... H-diff-070000.sna When the Task runs at 7 am the next day, the backup image filename could be identical and the first backup image will be deleted. If you add a random number to the backup image filename, this makes identical filenames very unlikely. A backup image filename like this... H-diff-070000-19235.sna Your full script would be the same but your diff would be... Code: snapshot64.exe HD1:* "D:\System_Backup\Drive_Snapshot\Entire-1\$disk-diff-%timestamp%-%random%.sna" -h"D:\System_Backup\Drive_Snapshot\Entire-1\$disk.hsh" -L0 --UseVSS -W
OK. I gave you the wrong script. I should have shown you the diff. My current diff is this. I'll change it to that. Will the current fulls and diffs still be OK, or do I need to delete them? Code: snapshot64.exe HD1:* "D:\System_Backup\Drive_Snapshot\Entire-1\$disk-diff-%timestamp%.sna" -h"D:\System_Backup\Drive_Snapshot\Entire-1\$disk.hsh" -L0 --UseVSS -W I see you've added %random%. I didn't know about that one. Edit:
Your current full and diffs are fine. Just keep going with the new diff script. You can use both diff scripts for the same Entire-1 folder. Mixed diffs are fine. I see you are doing that. Great. When you create your next diff the random number will be different.
I've done numerous backups and a few restores. All have been successful. All restores have been run from TBLauncher outside of Windows. But I have been testing restores from within Windows and I get two different results depending whether I select. Restore Complete Disk From Images or Restore Disk From File Here are the screens that I am presented with. Restore Complete Disk From Images Restore Disk From File I am just wondering why when I select Restore Complete Disk From Images, I am not offered to reboot. Both options are attempting to restore the system disk C: . The only difference is one is all partitions and one only one partition. As you can see with Restore Disk From File, I am presented with the message that restoring the system disk C: is impossible with the operating system running and offers to schedule a restore at next reboot. But Restore Complete Disk From Images doesn't give me that option. It gives me the message that restoring a complete disk to the current system disk is not supported.
Did you back up all partitions at the same time with a Snapshot version 1.45 or later? Only then can a complete disk be restored with this method. Source (I did not find an English translation for this page).
Krabbath, http://www.drivesnapshot.de/en/rest1.htm This is a partition restore and not a Complete Disk restore. For Drive, read partition. For Disk, read Complete Disk. Hadron, it looks like we need to accept that boot media is needed for a Complete Disk restore.
It's a Restore Disk From File which translates to a partition. The language could be more informative, but I realise that it's German software. Great software.
Hadron, you can restore a Complete Disk from Windows without requiring a reboot, as long as the disk doesn't contain the booted OS. But if the disk contains the booted OS you need boot media.
Yes, Brian. I knew that would be the case that it would need to be rebooted if the restoration contains the OS in use. But the point I was making is the Restore Disk From File option can have the OS in use and offer to schedule a restore at next reboot, but Restore Complete Disk From Images option doesn't. Also, as I said earlier, I think the options could be better worded as Restore Disk From File is still restoring an image, but only a single partition.