Dear Perlers,
A little while ago I asked about solutions to the graceless
failure I was experiencing with psync (would look like it copied
data, but would happily create zero-byte files once out of room,
without complaining; and on re-psync, would copy reams of links,
making me unsure that everything'd been copied before, since it was
copying again ...).
Rsync was mentioned as a solution, and using rsync under Tiger
or using rsyncX, whis looks plausible. However, when I've tried this
I've gotten errors. Also, others complain it's not ready for prime
time: <http://www.macdevcenter.com/pub/a/mac/2005/07/22/backup.html?
page=2> (see comments in bottom; these reflect my experience, with
broken pipe errors, etc.)
One happy note was that rsync has a flag for comparing checksums
during rsync runs. This assures that copies really put the right
data -- and all the right data -- in each of the files. The downside
is that I have no idea what it does to compaare checksums on extended
attributes, resource forks, or the like. The psync script could
certainly have md5 sums added to the "scanning" cycle of both source
and destination, and have a scan of all copied items to ensure the
sums were correct ... but I don't have an instinct for the least-
overhead way to do this. Also, doing checksums over a connection to
a remote volume would create ridiculous traffic: the machine running
psync would need to receive all the data in all the files to do a
checksum on each, which is in my view why rsync has a client/server
model (to do processing on each end, reducing transmission of data).
So my questions are:
(1) Does psync really have an issue with symlinks, and recopy
symlinks all the time? (or is there a difference between relative and
absolute paths in symlinks, and does psync treat them differently and
thus fail to recognize a good copy during pre-copy checks, forcing
recopies?)
(2) Does anyone have a solution for copy verification under
psync, or should I experiment rolling my own "verify" flag in the
psync script?
(3) Does anyone have experience getting backups to work well
under rsync, with or without perl involvement?
Thanks in advance :-)
Best regards,
Chris
Darryl Holder - 26 Jul 2005 04:49 GMT
Chris;
I have worked out a usable method of using the Mac-aware version of
rsync that the GUI app RsyncX is intended to work with. I started out
creating command strings with the GUI app and broke down what operations
they performed. I then went through the wonderland of learning ssh
setup with private-key no password login.
I then hacked a Perl script to command via a cron event on the backup
server by UDP datagrams a Perl script running as a daemon on the client
to throw the proper command to the rsync utility. This is a lot more
complicated than I have described, very kludgy, and in great need of
refactoring - but is seems to work. So even a dumb-bunny like me can
after a while succeed (sort of).
I have no idea how the internals of rsync or psync really work - I
started out using psync, but it seemed to quit working reliably about
10.3.5 or so.
I can send you some notes, code, etc. offline if it might help (if you
promise not to die from laughing at my "programming").
darryl holder