BackupPC-users

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

2009-03-26 18:29:26
Subject: Re: [BackupPC-users] UPDATED: Fully automated script for creating shadow copies and launching rsyncd
From: "David Lasker" <dave AT altosdesign DOT com>
To: <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 26 Mar 2009 15:21:11 -0700
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.

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?

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.

3. There is a typo in the line:

 $DOSDEV "${letter}:" /D 2> /dev/nuul

which should be changed to /dev/null

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.

5. If you were previously running rsyncd as a Windows service, you need to
remove it, by using cygrunsrv -R.

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.

Hope that helps...

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/

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