BackupPC-users

[BackupPC-users] Need help with pre dump command execution on win 7 client.

2011-02-09 13:07:51
Subject: [BackupPC-users] Need help with pre dump command execution on win 7 client.
From: Jeffrey Newman <jeffn AT photorepo DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 9 Feb 2011 10:05:54 -0800
Hi,

I need some help with BackupPC's execution of a cmd script on a Windows 
machine,
from a Linux machine. I cannot get the command to execute on the remote
(client) machine under BackupPC.

I know it takes a lot of information to understand what is going on at a
random place in the world, so I will try to be succinct yet comprehensive. If 
any
further information is needed please let me know.

1) I have BackupPC running on Linux.

2) I am using the rsyncd method for file transfer.

3) I have the rsyncd transfer method working just fine on 10 Linux clients.

4) I have rsyncd, running under cygwin, working fine on a single windows 7
   client.

5) I've written a short cmd script to dump the registry, and create a shadow
   copy of the c: drive on the win7 client. This script runs fine on the win7
   machine locally.

6) I have winexe running on the Linux machine. I can execute the regShadow cmd
   script on the win7 machine from the Linux machine using winexe.

7) The problem is that I cannot execute the regShadow cmd script on the win 7
    machine using winexe on the Linux machine from BackupPC.

8) The error I am getting back in the log file is(I touched up the formatting
to fit this email):

2011-02-09 07:17:47 
  Output from DumpPreUserCmd: Exec of "winexe --reinstall -W WORKGROUP -U
  backuppc%<password> //hsback-1 
   'cmd /C c:/Users/backuppc/shadowDrv'" failed  

8.5) The client specific BackupPC conf entries are:

     $Conf{RsyncShareName} = ['cshadow'];
     $Conf{DumpPreUserCmd} = '"winexe --interactive=0 -W WORKGROUP -U
         backuppc%<password> //$client \'cmd /C 
c:/Users/backuppc/shadowDrv\'"';

  NOTE: I also tried it with no interactive switch.

9) I've tried a number of different quoting combination. Nothing worked. I
   tired to create a simple shell script, and just execute it, still didn't
   work. Shell script (preCmd) here.

          winexe -W WORKGROUP -U backuppc%Winston54 //hsback-1 'cmd /C
          c:/Users/backuppc/shadowDrv'

10) Here is the cmd script that runs on the win 7 machine:

    :: Dump the registry.
    reg export HKLM hklm.reg /y

    reg export HKCU hkcu.reg /y
    reg export HKCR hkcr.reg /y
    reg export HKU  hku.reg /y                                                  
                                          
    reg export HKCC hkcc.reg /y                                                 
                                          

    :: Delete the B: pseudo drive.                                              
                                          
    dosdev -r -d b:                                                             
                                          

    :: Load the ID from the last shadow copy made from this script.             
                                          
    call vss-vars                                                               
                                          

    :: Delete the last shadow copy.
    vshadow -ds=%SHADOW_ID_1%                                                   
                                          

    :: Create a persistent shadow copy of the C drive.                          
                                          
    :: Put the shadow copy id into the vss-vars.cmd file.                       
                                          
    vshadow -p -script=vss-vars.cmd c:

    :: Load the ID into this cmd file's attribute space.
    call vss-vars

    :: Map the new shadow copy to the B: drive.
    vshadow -el=%SHADOW_ID_1%,b:

11) I have ssh working with no password required in either direction between
the win 7 client and the Linux server. All the keys are set up.

Any help would be really appreciated.

thanks

Jeffrey

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>