Terabyte Image for Windows backup strategy?

  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

    /Steve.
  • Larger Font Styles
    Guest:

    Just a quick heads-up that I've implemented larger font variants of our forum's light and dark page styles. You can select the style of your choice by scrolling to the footer of any page here. This might be more comfortable (it is for me) for those with high-resolution displays where the standard fonts, while permitting a lot of text to fit on the screen, might be uncomfortably small.

    (You can permanently dismiss this notification with the “X” at the upper right.)

    /Steve.

pathead

New member
Nov 3, 2020
1
1
I can't remember which episode(s) it was on but in the past Steve has mentioned using Image for Windows and I believe he said he does nightly backups and I was wondering if he has ever elaborated on that backup strategy? Specifically, he mentioned something about hiding his backup drives that has me curious, though I'd understand if he wanted to keep that secret... In general, I'd be interested to hear how he manages and automates the process and was hoping he might be able to elaborate on that or possibly share some of the scripts he uses? Regardless, thanks for doing what you do Steve!
 
  • Like
Reactions: Dave

Dave

Dave Jenkins, N1MXV
Sep 16, 2020
82
50
Gardner, MA (USA)
I can't remember which episode(s) it was on but in the past Steve has mentioned using Image for Windows and I believe he said he does nightly backups and I was wondering if he has ever elaborated on that backup strategy? Specifically, he mentioned something about hiding his backup drives that has me curious, though I'd understand if he wanted to keep that secret... In general, I'd be interested to hear how he manages and automates the process and was hoping he might be able to elaborate on that or possibly share some of the scripts he uses? Regardless, thanks for doing what you do Steve!
Invulnerable automated/hot backup really is kinda the holy grail, in light of ransomware and such.
 

JimWilliamson

Member
Nov 15, 2020
22
5
Specifically, he mentioned something about hiding his backup drives that has me curious
I am curious as to more info behind the comment.

From you saying this, I can offer this process... I use SyncBack Free (2BrightSparks) for data backup use. The program can access a volume via either the drive letter or the volume ID. The volume ID is something most of us rarely consider. Think of the volume ID as the "full name" and the drive letter as the "nickname". From what I have info on, ransomware type programs seem to attack drive-letter-accessible volumes (local and network). One would think - remove the drive letter and this might stop those programs (or reduce the risk) from getting access to precious, online connected, data.

The Windows program (command line) for showing drive letter & volume ID assignments is MountVol.

Say, I have an USB attached backup drive that windows, for this session, has assigned drive letter H:, I'll run the MountVol command and it will display mounted volumes - their ID's and associated drive letters. I look in the simple list for drive H: and highlight / copy the volume ID text. In the backup program, I substitute the volume ID wherever the drive letter would be used.
H:\SyncBack\DailyBackup\
\\?\Volume{f78036a0-84d6-11eb-bf18-7085c2466b09}\SyncBack\DailyBackup\

That's the first part - the setup. The second part - the important step. Run Disk Management, find the partition / volume in question (it would have an H: drive letter assigned) and right-click upon it. From the context menu, select "Change Drive Letter & Paths". A window should appear with the H: drive letter. Click the Remove button and then OK and close Disk Management. Drive "H:" is no longer visible to the system. Run the backup program - it should work as desired.

I believe volume ID access does require some network component to be active - I don't recall if it's Client for Windows or File & Printer Sharing or perhaps the workstation service.

Volume ID access, with or without a drive letter assigned, is quite handy when configuring a backup program to reliably talk with USB connected devices. Should the system assign a different drive letter - it does not matter - the volume ID is a reliable access method.
 
Last edited:
  • Wow
Reactions: CredulousDane

FlyingPenguin

New member
Sep 26, 2020
4
1
I think I came up with my method based on what Steve described, which are batch files that mount and unmount my backup image hard drive. I use Acronis to image my workstation, but it makes no difference. All these imaging apps allow you to specify an .exe or .bat file to run before and after the imaging operation. Acronis has it's own scheduler, and one of the options for the job is to specify before and after operations.

Using this method the drive is mounted right before the image operation and unmounted right after. The only time the drive is mounted and visible to the OS is during the brief window that the image is being made. I can also run the mount batch file myself manually in order to have access to the drive for my own purposes (like to confirm my images are up to date, or copy one to another archive). This only affects Windows, so the drive is still accessible if you boot from your imaging app's rescue USB to restore an image.

I use an internal HDD for my image backups, but I *ASSUME* this would work just as well with an external USB drive. You have to know the volume name of the drive which can be obtained using the command line: MOUNTVOL {drive letter}: /L

These are the scripts that I use, and I just found examples from Googling around. My backup drive is letter W. I put some waits in there because I found that the drive needed some time to spin up and the file system needed time to finish saving the image file (I was initially getting failed backups occasionally until I did this). I also use a commandline program called DELS in the MOUNT.BAT script to prune the drive containing the images, to keep it from filling up. DELS will delete all files in a path older than the specified AGE parameter (in days). You can remark that out if you're using something else to prune old copies. Apologies for my sloppy coding skillz. Hope this helps.

MOUNT.BAT:

Code:
@echo off

REM Be sure to change this to the drive letter you want to mount the drive to!
set drive=W

REM Be sure to change this to the Volume Name of the drive you want to mount!
REM Get the Volume Name by using command line command: MOUNTVOL {drive letter}: /L  (eg: MOUNTVOL W: /L)
set volume=\\?\Volume{6092273f-1638-11e6-8276-d017c2a807be}\

:start
echo Mounting Drive...
mountvol %drive%: %volume%
echo Drive Mounted!

REM Remark out the PAUSE below for final code
REM pause

REM Wait 5 seconds
TIMEOUT /T 5 /NOBREAK

REM Prune External HDD
C:
cd\
dels /nf /age70 /nologo "W:\!!! WEEKLY ACRONIS SCHEDULED BACKUPS\*.tib"

exit

UNMOUNT.BAT:
Code:
@echo off

REM Wait 10 seconds and give Acronis time to save backup
TIMEOUT /T 10 /NOBREAK

REM Be sure to change this to the drive you want to unmount!
set drive=W:

echo Unmounting Drive...
mountvol %drive% /p
echo Drive Unmounted!

REM Remark out the PAUSE below for final code
REM pause
exit
 
Last edited:

FlyingPenguin

New member
Sep 26, 2020
4
1
I thought someone might be interested in that DELS app. It's a free app called DELS Recursive File Delete Utility. Originally written by Greg Wittmeyer. My old copy is version 1.9 from 2010. Looks like Greg's website is here: https://www.gammadyne.com/cmdline.htm#dels

BUT somehow I don't like the look of that site. Looks like someone maybe bought the rights to his utilities and took it over. They list the most recent version as 4.0, but the original is a simple and elegant app, and I'm not sure what they could possibly have added to it in a 4.0 version that anyone would need. My old 1.9 version works fine, and it's only 304K. Use at your own risk.

There are also lots of examples of batch file code that can do the same thing if you google around. I found one here using the ForFiles console command in windows (under Method 2): https://www.winhelponline.com/blog/delete-unused-files-older-than-x-days-windows/

I may start using that myself. First I've heard of that command. Probably because it first appeared in Win7, and I haven't done much batch file coding since XP days.
 
Last edited:
  • Like
Reactions: CredulousDane

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
free app called DELS Recursive File Delete Utility
I don't know this utility, but there used to be https://en.wikipedia.org/wiki/DELTREE in some versions of DOS/Windows, and according to the Wikipedia page there is rmdir is current versions of Windows:

Code:
Microsoft Windows [Version 10.0.19042.870]
(c) 2020 Microsoft Corporation. All rights reserved.

rmdir /?
Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      Removes all directories and files in the specified directory
            in addition to the directory itself.  Used to remove a directory
            tree.

    /Q      Quiet mode, do not ask if ok to remove a directory tree with /S
 

rfrazier

Well-known member
Sep 30, 2020
231
77
I'm a big fan of image backups. The problem is they're hard to get done for me at least. If you have the backup drive attached to the PC (or LAN) all the time, there's the potential of malware getting to it. I have a method which works ... when I WORK IT ... which unfortunately isn't often enough. But, I actually use a hardware duplicator. I physically pop the cover off the pc, remove the hard drive, put it and a spare in the duplicator, and press a button. I come back 5 hours later and put the hard drive back in the PC. If my hard drive dies, I just put in the spare, reboot, and pickup where I left off minus the new stuff. For that, I'm using JungleDisk that @Steve recommended years ago on AWS to save nightly changes. Even if you figure out a way to run an image backup automatically, they sometimes have problems when the OS is running. If the pc is shut down, that doesn't happen. Also, if the pc is shut down, there's no way malware can jump onto your backup drive.

Note, if you're running something like JungleDisk (or any online backup), and you have the setting to auto delete remote files when you delete local ones on, you MUST turn that off before allowing the backup software to see the net again if you need to do a restore. Otherwise, it will immediately (or when it runs) delete all your remote files that don't exist on the local hard drive, those same files you're going to want to restore. Note also that having a local spare drive doesn't protect you from local disaster, fire, theft, flood, tornado, etc.

May your bits be stable and your interfaces be fast. :cool: Ron