POV-Ray : Newsgroups : povray.off-topic : Encrypted drive problem : Re: Encrypted drive problem Server Time
4 Sep 2024 23:19:08 EDT (-0400)
  Re: Encrypted drive problem  
From: Darren New
Date: 5 Dec 2009 12:46:25
Message: <4b1a9c71@news.povray.org>
Orchid XP v8 wrote:
>>> The issue is that most people have their Outlook pst files as their 
>>> most valuable posession, and to backup the pst files you need to quit 
>>> Outlook 
>>
>> Not true. Just make a shadow copy, and back up the shadow copy. It's 
>> pretty easy.
> 
> OOC, how do you actually do this?

The only trick is that vshadow will make a shadow copy, and then delete it 
when your script exits. So this sets up some environment variables and calls

vshadow -nw -p -script=XYZ.bat -exec=PDQ.bat c:

That creates a shadow copy of C:, writes  bunch of environment variables 
into XYZ.bat that describes where it put the shadow copy, then runs PDQ.bat.

In this case, the script that invokes vshadow is the PDQ script, so after it 
invokes vshadow, it sources the temporary script to set the environment 
variables[1] and deletes it and goes to the end of the script. At the 
beginning, it tests if we're in the callback (looking at CALLBACK_SCRIPT) 
and goes to IS_CALLBACK if so. (This obviously would have been more clear as 
two scripts, but I never really expected to write a tutorial about it.)

If it's running as the callback, it sources the generated script full of 
environment variables, calls vshadow again to connect SHADOW_ID_1 to B:. It 
then runs robocopy to back up \users\darren to m:\darren with robocopy.

When robocopy finishes, it falls off the end of the script, which returns to 
the first callback, which sources the environment variables into *that* 
script and jumps to EOF, which then invokes vshadow to delete the shadow 
copy (which also unhooks B: from anything).

Kind of convoluted, but as you might guess, I'm not the original author. 
Looking at it again, I realize what one really wants is to just stick :EOF 
after the first invocation and be done, and let the return delete the shadow 
copy.

[1] MS clearly hasn't caught on to the whole "environment variables get 
passed in memory" concept yet.

-- 
Darren New, San Diego CA, USA (PST)
   Human nature dictates that toothpaste tubes spend
   much longer being almost empty than almost full.


Post a reply to this message


Attachments:
Download 'backup darren.bat.txt' (3 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.