That's almost certainly because of a failure to quote sufficiently. I
think you need to do something more like this:
"%shadpath%" "%source%" q: robocopy q: "%target%" "%file%" "%parms%"
You could always throw an echo at the beginning of the line to be sure.
Let us know if that doesn't work.
Yep, I'm guessing you're right. The C runtime does a terrible job on
this, so we had to write our own quoted argument handling. We must
have gotten it wrong.
I've entered issue #4 on GitHub
(https://github.com/candera/shadowspawn/issues/4) to track this. One
of us will tackle it as soon as we get some time.
In the meantime, if you need a workaround, you could try using the
short name of the source directory. Probably something like
C:\Users\John
\Documents\Outloo~1. If that doesn't work, let us know and we'll try
to come up with something else.
Thanks for trying out ShadowSpawn - the bug report is really helpful!
I'm guessing that it's the /copyall that's not working. There might be
something about shadow copies that robocopy doesn't like. Can you try
it with a subset? According to the docs, /copyall is equivalent to
/copy:datsou. If you try dropping one of the options at a time, we can
figure out what the issue is.
Hmm. OK, are you able to get it to work at all? I.e. if you just do
D:\Software\ShadowSpawn\W7x64\ShadowSpawn.exe
"C:\Users\John\Documents\Outloo~1" q: robocopy q:\
"D:\Backup\MEDION\My PSTs" "My.pst"
What happens?
> It presumably depends on what file system the shadow copy presents?
Yeah, that's not totally clear to me at this stage.
> And, out of interest, where is the copy physically located?
There is no copy: it would take way too long to actually copy an
entire 1TB volume or whatever. The volume shadow service creates a
snapshot, which is just some bookkeeping magic that says, "Hey, at
such-and-such a time, a snapshot was created." Then, if anyone writes
to the file, it makes additional copies of just the changed parts of
that file. The snapshot gets surfaced at a path that looks like
\Device\SystemShadowSomethingSomething15.
But perhaps I misunderstood your question.
So, what happens is that we call CreateDosDevice, and pass it the path
to the shadow copy, which is something like
\Device\VolumeSnapshotSet17. That makes that part of the IO namespace
at the drive letter you specify. We don't dismount it until robocopy
exits. You should be able to do something like this:
shadowspawn C:\some\folder q: notepad.exe
and you'll be able to use Explorer to browse the Q: drive until
notepad.exe exits.
I'm not sure whether that helps you at all, but that's the technical
answer to your question. If any of that doesn't make sense, or if the
notepad experiment doesn't work, let us know and we'll keep working on
figuring it out.
> I tried, in the d:\software\shadowspawn\w7x64 subdirectory
> shadowspawn d:\software\shadowspawn\w7x64 q: notepad q:\test.txt
> and looking at Windows Explorer showed me a Q: drive containing the
> contents of the aforementioned subdirectory.
>
> But I also tried, whilst in the same directory:
> shadowspawn . <the rest>
> shadowspawn .\w7x64 <the rest>
> and received in the Notepad window, "The filename, directoryname, or
> volume label syntax is incorrect.! and there was no Q: drive visible
> in WIndows Explorere.
Ah, looks like we're not dealing with relative paths right now. I've
created issue #7 (https://github.com/candera/shadowspawn/issues/7) to
track this. Hopefully I'll get some time this Friday to work on some
of the current bugs.
The workaround, obviously, is to use absolute paths for now.
Hmm. We have gotten robocopy to work with ShadowSpawn, so we'll have
to look into this one. I've opened issue #8
(https://github.com/candera/shadowspawn/issues/8) to track this.
When you say Notepad works "mostly", what do you mean? Are you
observing anything strange when you use notepad?
Also, can you give us a bit more information to help use repro?
* What operating system are you on?
* What type of filesystem is D:? FAT or NTFS?
Thanks. We'll do our best to get to the bottom of this.
Kim and I spent today going through and making a bunch of fixes to
ShadowSpawn (changelog here [1]). We weren’t able to reproduce your
error after we had already made a number of fixes: we had a bunch of
successful runs of shadowspawn plus robocopy. We also verified that
relative paths work with all our changes. So maybe you could try
grabbing version 0.2.0 from the download page [2] and try with that.
If it still doesn’t work, we’ll keep digging.
Thanks for helping us find these problems!
[1] https://github.com/candera/shadowspawn/wiki
[2] http://github.com/candera/shadowspawn/downloads
First of all, I'm sorry for all the false starts. It must be
frustrating. It certainly is for me!
We've had no trouble getting ShadowSpawn to launch Robocopy, even
using a command line that's as close to what you're doing as we can.
Clearly something is still up, though. So let's try removing RoboCopy
from the equation. That should at least tell us whether the issue is
with RoboCopy or ShadowSpawn. So try this instead:
D:\Software\ShadowSpawn\W7x64\ShadowSpawn.exe
"C:\Users\John\Documents\Outloo~1" q: xcopy "q:\My account.pst"
"D:\Backup\MEDION\My PSTs"
If that works, then something is up with RoboCopy, and we can
investigate further down that route. For example, we can see what
happens if you shut down Outlook and run Robocopy without ShadowSpawn.
If that fails, then clearly there's likely going on with the shadowing
process. The test I would do there would be to use ShadowSpawn to
launch notepad, then, from within notepad, do a File->Open to see if I
could poke around in the Q: drive or not. You should even be able to
right-click on files to do a copy and paste back to the D: drive.
Also, did we ever try this with the full path under 0.2.0? I.e. going
back to the path that doesn't have the tilde in it? That shouldn't be
necessary now that we got our quotes handling straightened out, but
it's worth a try.
Assuming that there actually is a file literally called $.txt, that
should work just fine.
So, it looks like there's definitely some issue with creating the
shadow copy, or at least with mounting it on your machine. I'm pretty
well stumped as to what it might be. I can only think of a few more
things to try:
1) Try it on a different machine (if possible) and see if you have the
same problem.
2) Reboot, assuming you haven't already done so.
3) Try hobocopy [1] instead.
I've been racking my brain trying to think of something else, but
right now that's the best I can come up with.
Hi John. Just wanted to follow up with you to see if you had any luck
with any other configurations. We don’t want to abandon the issue if
there’s still something to try, but at this point it seems like it
might be something on that particular machine. Have you been able to
try it anywhere else, or done any other experimentation that would
shed any new light on the problem?
We gave it another try under both Windows XP and W2K8R2. Here’s what we got:
ShadowSpawn.exe "d:\_personal\_mail" q: xcopy "q:\archive.pst" "c:\temp"
ShadowSpawn (c) 2011 Craig Andera. shado...@wangdera.com
Shadowing d:\_personal\_mail at q:
Launching command: xcopy "q:\archive.pst" "c:\temp"
Q:\archive.pst
1 File(s) copied
Launched command finished with exit code: 0.
Shadowing successfully completed.
Shadowing d:\_personal\_mail at q:
Launching command: xcopy "q:\archive.pst" "c:\temp"
Q:\archive.pst
1 File(s) copied
Launched command finished with exit code: 0.
Shadowing successfully completed.
I run Windows 7 Ultimate x64, and I've tried it there successfully,
although not against a PST (I don't use Outlook). It doesn't look like
it has anything to do with the file you're trying to copy, though. It
looks more like the shadow copy isn't showing up in the device
namespace the way it's supposed to. I suppose it's possible they did
something to limit VSS on the Pro version of Windows 7. I'll give that
a try when I can build up a VM with a Win7 Pro image. That may take a
little while.
Thanks for continuing to chase this down. Hopefully we'll find the
problem and get it fixed soon.
No, just to the fact that I've been on travel for the last week. :)
I think it's possible that ShadowProtect is somehow interfering with
ShadowSpawn. Do you have an easy way to test the hypothesis?
It was a work trip, but by coincidence it was back to my home town, so
I got to see some friends and family.
> I certainly don't want to uninstall Shadow Protect but I'd be quite
> happy temporarily to make some relevant registry changes so I could
> try their effect with ShadowSpawn. Can you say which keys/values I
> should check/change?
That would depend on Shadow Protect, with which I am not at all
familiar. I did find this [1] which was listed on this page [2]. That
might be of some help. It does look like it's doing some low-level
monkeying with VSS, so Shadow Protect seems like it could be our
culprit.
[1] http://www.storagecraft.com/kb/questions.php?questionid=75
[2] http://www.storagecraft.com/kb/search.php?q=VSS
Good catch! I've re-opened issue #8 [1]. We'll have to look into what
we can do to address this. It's possible that we would be able to
specify the Microsoft provider, and that that might fix the issue.
That's going to take some research and some coding, so it may be a
little while before we can push some bits out.
In the meantime, it looks like the workaround is to temporarily adjust
the registry, run ShadowSpawn, and then put the registry back the way
it was. That's scriptable, so would that serve as a workaround while
we try to sort out the underlying issue?
Is ShadowProtect scheduled using the built-in Windows Task Scheduler?
If so, there are some facilities in there that might help, like the
ability to not start a new task if the old one is already running. You
could also sort of manually deal with that yourself by writing some
sort of lock file right before you change the registry key, and
deleting it right after you put it back. Then you'd just have to rig
the ShadowProtect job to not run if the lock file is present. It's a
major hack, and there's probably still some tiny possibility of
overlap, but it might get you by for a bit.
So I think we have our smoking gun. And I found the API where one
tells VSS which provider to use. We're currently indicating that the
default should be used. I'm guessing that the StorageCraft provider
gets used in that case, which is incorrect. We should be able to
change that code to indicate the Microsoft default provider should be
used. If we're lucky, that'll fix the problem.
We'll see if we can get that change made before too long.
Thanks again for your patience!
Just FYI, the US holiday this week means I don't get an Open Source
Friday until next week. We'll see if we can fit it in before then, but
wanted to make you aware that it may take a while to get the new
version out.
Give it a try and let us know if it works for you. Or especially if it doesn't!
https://github.com/candera/shadowspawn/downloads
D:\Software\ShadowSpawn\W7x64\ShadowSpawn.exe
"C:\Users\John\Documents\Outlook Files" q: robocopy q:\
"D:\Backup\MEDION\BlueYonderPSTs" "BlueYonder account.pst" /copy:d /np
/r:0 /w:0
You could also omit the quotes entirely, as there are no spaces in the
pathnames in this case.
But this is very encouraging, because it looks like the shadow copy
worked, and now robocopy is complaining.
Awesome! So glad this worked for you. Thanks again for your patience in tracking this down. I'm quite sure we wouldn't have found this bug otherwise.
Let us know if you run into any other problems!
copy is not actually a command. It's built into cmd.exe, and is
interpreted directly by the shell.
Try xcopy instead. The command line is somewhat different, but there's
an actual executable.
Good idea. I'll update the FAQ.