Author Topic: Registry Backup not always ending when run by Task Scheduler - revisited  (Read 11386 times)

0 Members and 1 Guest are viewing this topic.

Offline bobn42855

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 6
  • Karma: 0
    • View Profile
Hey, Shane. Not sure how I'm supposed to reopen this topic. I have had several scheduled registry backups hang since I brought this up initially. I don't know if this helps at all, but I did notice a definite difference in the Log_vss.txt files between runs that don't hang and those that do. I'm attaching them here.

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
Threads auto close after no posts for 30 days. If that happens just start a new thread :-)

OK in the successful log you will see this
07/28/2013  01:17 AM    <DIR>          Program Files (x86)
07/31/2011  10:23 AM    <DIR>          Temp
05/27/2013  11:50 AM    <DIR>          Users
07/28/2013  12:51 AM    <DIR>          Windows
               1 File(s)          1,003 bytes
              18 Dir(s)  385,110,241,280 bytes free

C:\>start "" /wait "C:\Program Files (x86)\Tweaking.com\Windows Repair (All in One)\files\registry_backup_tool\files\vss_pause.exe"

When the vss_pause is running the reg backup knows the shadow copy is ready and starts copying the reg files from that snapshot.

After it is done the snapshot is deleted

C:\>"C:\Program Files (x86)\Tweaking.com\Windows Repair (All in One)\files\registry_backup_tool\files\dosdev.exe" -r -d B:

--------------------------------------------------------------------------------
[8/3/2013 - 3:00:32 AM]
--------------------------------------------------------------------------------
Current definition: B: = \??\GLOBALROOT\Device\HarddiskVolumeShadowCopy16
B: deleted.


Then in the susccessful log you see vss return the text it is doing, the log file is capturing the output from a cmd.exe window.

Code: [Select]
--------------------------------------------------------------------------------
[8/3/2013 - 3:00:33 AM]
--------------------------------------------------------------------------------

VSHADOW.EXE 3.0 - Volume Shadow Copy sample client.
Copyright (C) 2005 Microsoft Corporation. All rights reserved.


(Option: Generate SETVAR script 'C:\Windows\temp\vss-setvar.bat')
(Option: Execute binary/script after shadow creation 'C:\Windows\temp\vss.bat')
(Option: Create shadow copy set)
(Gathering writer metadata...)
(Waiting for the asynchronous operation to finish...)
Initialize writer metadata ...
Discover directly excluded components ...
- Excluding writer 'BITS Writer' since it has no selected components for restore.
- Excluding writer 'MSSearch Service Writer' since it has no selected components for restore.
- Excluding writer 'Shadow Copy Optimization Writer' since it has no selected components for restore.
Discover components that reside outside the shadow set ...
- Component '\BCD\BCD' from writer 'ASR Writer' is excluded from backup (it requires  in the shadow set)
Discover all excluded components ...
Discover excluded writers ...
- The writer 'ASR Writer' is now entirely excluded from the backup:
  (the top-level non-selectable component '\BCD\BCD' is an excluded component)
Discover explicitly included components ...
Verifying explicitly specified writers/components ...
Select explicitly included components ...
 * Writer 'Task Scheduler Writer':
   - Add component \TasksStore
 * Writer 'VSS Metadata Store Writer':
   - Add component \WriterMetadataStore
 * Writer 'Performance Counters Writer':
   - Add component \PerformanceCounters
 * Writer 'System Writer':
   - Add component \System Files
 * Writer 'WMI Writer':
   - Add component \WMI
 * Writer 'Registry Writer':
   - Add component \Registry
 * Writer 'COM+ REGDB Writer':
   - Add component \COM+ REGDB
Creating shadow set {f6ed2292-bc9a-4423-bd8a-efc8537a059f} ...
- Adding volume \\?\Volume{be886a46-9041-11e0-9873-806e6f6e6963}\ [C:\] to the shadow set...
Preparing for backup ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Creating the shadow (DoSnapshotSet) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)
Shadow copy set succesfully created.

List of created shadow copies:


Querying all shadow copies with the SnapshotSetID {f6ed2292-bc9a-4423-bd8a-efc8537a059f} ...

* SNAPSHOT ID = {f9824c4a-cbb7-4bf0-982f-dddfb3d03f50} ...
   - Shadow copy Set: {f6ed2292-bc9a-4423-bd8a-efc8537a059f}
   - Original count of shadow copies = 1
   - Original Volume name: \\?\Volume{be886a46-9041-11e0-9873-806e6f6e6963}\ [C:\]
   - Creation Time: 8/3/2013 3:00:16 AM
   - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy16
   - Originating machine: Bob-PC
   - Service machine: Bob-PC
   - Not Exposed
   - Provider id: {b5946137-7b9f-4925-af80-51abd60b20d5}
   - Attributes:  Auto_Release Differential

Generating the SETVAR script (C:\Windows\temp\vss-setvar.bat) ...
- Executing command 'C:\Windows\temp\vss.bat' ...
-----------------------------------------------------
-----------------------------------------------------
- Mark all writers as succesfully backed up...
Completing the backup (BackupComplete) ...
(Waiting for the asynchronous operation to finish...)
(Waiting for the asynchronous operation to finish...)

Snapshot creation done.

--------------------------------------------------------------------------------
[8/3/2013 - 3:00:33 AM]
--------------------------------------------------------------------------------

C:\>
--------------------------------------------------------------------------------
[8/3/2013 - 3:00:38 AM]
--------------------------------------------------------------------------------
Closed. No longer reading pipes.
--------------------------------------------------------------------------------

But in the unsuccessful one it sends the command to delete the snap shot and instead of vss returning anything it just closes.

C:\>"C:\Program Files (x86)\Tweaking.com\Windows Repair (All in One)\files\registry_backup_tool\files\dosdev.exe" -r -d B:

--------------------------------------------------------------------------------
[8/3/2013 - 4:23:23 PM]
--------------------------------------------------------------------------------
Current definition: B: = \??\GLOBALROOT\Device\HarddiskVolumeShadowCopy17
B: deleted.

--------------------------------------------------------------------------------
[8/3/2013 - 4:23:29 PM]
--------------------------------------------------------------------------------
Closed. No longer reading pipes.
--------------------------------------------------------------------------------

So either for some odd reason the exe is losing the pipe to the cmd.exe to read the output or vss is crashing.

Shane

Offline bobn42855

  • Newbie
  • *
  • Join Date: Apr 2013
  • Posts: 6
  • Karma: 0
    • View Profile
First of all, your registry backup just pulled me out of another unwanted situation - thanks for that!

Regarding your reply here, I hope you were just thinking out loud and not expecting that your comments are going to help me figure out what the problem is. Some of it I only vaguely understand - the rest I don't understand at all. I take it to mean it didn't help you understand what the problem is. Let me know if there's anything else I can try or let you know that might help. Thanks!

Offline Shane

  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9281
  • Location: USA
  • Karma: 137
  • "Knowledge should be shared not hidden."
    • View Profile
lol no problem.

From the looks of it VSS may be crashing, or perhaps something else is using VSS at the same time?

If it keeps happening you can try the repairs I have listed on the help page, or just have the reg backup use the fallback method, which uses the windows api instead of vss :wink:

Shane