candera / shadowspawn

A Windows utility that mounts a shadow copy of the disk at a drive letter and then spawns an arbitrary command.
MIT License
184 stars 55 forks source link

Status of task schedule #18

Open kevindd992002 opened 9 years ago

kevindd992002 commented 9 years ago

I use shadowspawn as a scheduled task to backup some files from my C drive. It works properly in Windows 7 but when I migrated to Windows 8.1, it's giving me an (0x8001) error code in Task Scheduler. The log file of the robocopy process itself goes through just fine though, so my files are being copied properly but I'm not sure what that error code say. The weird thing is that this only happens sometimes and not consistent. When I try to manually run the task, sometimes it gives me a successful status.

The task just runs a batch file saved in c:\windows\system32 and the batch file includes these:

shadowspawn C:\Users\KevinMychal\AppData\Roaming\Mozilla\Firefox\Profiles\rrzrruax.default\sessionstore-backups Q: robocopy Q:\

D:\Backup\sessionstore-backups /R:5 /W:15 /COPYALL /PURGE /V /log:C:\robocopy_log.txt shadowspawn C:\Users\KevinMychal\AppData\Roaming\Mozilla\Firefox\Profiles\rrzrruax.default\bookmarkbackups Q: robocopy Q:\ D:

\Backup\bookmarkbackups /R:5 /W:15 /COPYALL /PURGE /V /log+:C:\robocopy_log.txt shadowspawn C:\Users\KevinMychal\Desktop Q: robocopy Q:\ D:\Backup\Desktop /R:5 /W:15 /DCOPY:DAT /COPYALL /MIR /V /log+:C:\robocopy_log.txt

What can I do to troubleshoot this further?

candera commented 9 years ago

What happens if you run it manually with /verbosity=4?

kevindd992002 commented 9 years ago

Is that switch a shadowspawn switch?

candera commented 9 years ago

Yes. See https://github.com/candera/shadowspawn#usage for full usage.

kevindd992002 commented 9 years ago

Can I email you the results of the script with the verbosity switch?

candera commented 9 years ago

Sure. candera@wangdera.com.

kevindd992002 commented 9 years ago

I just sent the email. Thanks.

candera commented 9 years ago

Looking at the logs, those both seem to be successful runs, and I don't see any weird things like other backup utilities that can occasionally screw things up. Unfortunately, I don't run Windows 8.1, so I don't have experience with it to say what might be the issue. There are a few links on the hobocopy troubleshooting page that might be helpful: https://github.com/candera/hobocopy/wiki

kevindd992002 commented 9 years ago

I know, right. Like I said, manually running the script gives me a 0x0 successful result but when it runs by the schedule then it gives me that error code. Should I file a case in hobocopy?

candera commented 9 years ago

If you're using shadowspawn there's no need to file an issue in hobocopy. I suspect this is somehow related to security, as scheduled tasks run in a different context than interactive ones. I can't think of a reason that it would fail intermittently, though. But like I said I'm not running Windows 8.1. I run it scheduled under Windows 7 all the time. I think there are some compatibility settings you can mess with in Task Manager that might help, but really, I'm not sure what the problem is.

Truthfully, I haven't touched this tool in several years, so I'm not super optimistic about being able to figure out what this is. Sorry about that, but I barely use Windows at all in the last five years.

kevindd992002 commented 9 years ago

i understand. Do you think the "configure for" setting in the task schedule itself has something to do with it? I had it running without an error code in Windows 7 also.

What does task manager have to do with task schedules?

candera commented 9 years ago

Sorry - I mistyped. I meant "Task Scheduler" not "Task Manager". I have no idea whether the "configure for" setting would help or not - just a sort of lame suggestion as to something to try tweaking.

xhelilajk commented 7 years ago

Just try to run it from the command line, if it works there, then there is some settings from Task Scheduler that have to be changed.