BackupPC-users

Re: [BackupPC-users] UPDATED: Fully automated script for creating shadow copies and launching rsyncd

2009-03-27 01:46:54
Subject: Re: [BackupPC-users] UPDATED: Fully automated script for creating shadow copies and launching rsyncd
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 27 Mar 2009 01:39:28 -0400
David Lasker wrote at about 15:21:11 -0700 on Thursday, March 26, 2009:
 > I was trying to figure out the best way to deploy VSS with BackupPC on my
 > Windows XP PCs, and found this wonderful script. Thank you so much Jeffrey
 > for sharing it!
 > 
 > I ran into (and solved) a few issues when deploying version 0.3 of the
 > script that I wanted to share, in the hope of making it easier for the next
 > user.
 > 
Thanks for the compliments and for the feedback

 > 1. The various archives for this mailing list all mangle the script in
 > different ways, i.e. at signs and colons get changed, extra newlines added,
 > indents removed, etc. It took me several hours of studying diffs between the
 > versions on backupcentral.com and mailarchive.com to get a working version.
 > Could Jeffery post this script in the "User Scripts" section of the wiki?

I would be happy to do that if you tell me where it is and what I need
to do.

 > 
 > 2. The script requires it be in the group "Administrators". I find it
 > impossible to set this group on my Windows PCs. When I chgrp a file to
 > "Administrators" or group number 544, the group name is changed to "root"
 > which is group number 0. I think this might be because both Administrators
 > and root both have the same SID in /etc/group. I finally gave up and changed
 > the script to allow ownership by either "Administrators" or "root" like
 > this:
 > 
 >  #Check permissions on files we call. Also touch SHADOWLOCK
 >  # Set up SHADOWDIR and check their permissions
 >  if [ $USESHADOWS -gt 0 ] && touch $SHADOWLOCK && \
 >   ! ( stat -c %A $0 | grep -q "^....r.x" && \
 >   [[ $(stat -c %G $0 ) =~ Administrators|root ]] && \
 >   stat -c %A $SHADOWEXECCMD | grep -q "^....r.x" && \
 >   [[ $(stat -c %G $SHADOWEXECCMD) =~ Administrators|root ]]  && \
 > 
 > If anyone has a better solution to this problem, please let me know.

I am by no means a Windows expert - but perhaps different versions use
different names for the superuser equivalent. Before I hard code in the
'root' alternative, it would be helpful to know whether these are the
only two possibilities or whether other versions or setups of Windows
use additional terms for the superuser

 > 
 > 3. There is a typo in the line:
 > 
 >  $DOSDEV "${letter}:" /D 2> /dev/nuul
 > 
 > which should be changed to /dev/null
Good catch - I will make this change
 > 
 > 4. If using nmblookup to resolve PC host names, then the calls to the script
 > in the pc config files should use $hostIP instead of $host.
Can you elaborate here so I know how to change the script?
Would $hostIP work in both cases or is some type of 'test' or config
necessary to determine which one to use?

 > 
 > 5. If you were previously running rsyncd as a Windows service, you need to
 > remove it, by using cygrunsrv -R.
I do not believe this is necessary. I have the service set up. A
problem would potentially only exist if you had the service started
automatically and left it running (in that case, the script would
either complain about rsyncd already running or kill it depending on
how you have the configuration set up)

 > 6. The script needs to be called in $Conf{RestorePreUserCmd} and
 > $Conf{RestorePostUserCmd} with the additional parameter "-u 0" in order for
 > restores to work.
To tell you the truth, I never tested the script on a restore.
Actually, I'm not sure you want to use VSS on a restore since wouldn't
you want to restore to the *current* filesystem rather than to a
shadow copy. In fact, I thought shadow copies were read only anyway.
Maybe I'm missing something so please help me here...

 > 
 > Hope that helps...
Very helpful! Let's continue the dialog and once we get the above
points nailed down, I will release an updated version incorporating
these changes.

 > Dave
 > 
 > 
 > ------------------------------------------------------------------------------
 > _______________________________________________
 > 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/
 > 

------------------------------------------------------------------------------
_______________________________________________
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>