Executive Summary:

I think that the script in the backuppc faq used to avoid client
access as root has a bug.  It should not use the --server and --sender
arguments to rsync, but just pass the arguments it gets from the
server.

Details:

I'm trying to rebuild a machine whose hard disk failed.  It had been
backed up using backuppc with rsync.

I apologize is this note is a tad confused. I actually started writing
it looking for help, but I think that I figured out the problem in the
course of writing it.

I've managed to get it back to the point where ssh, and rsync are
working between the client and the server without prompting for
passwords, and backuppc has actually succeeded in backing it up once
again.  I've got it set up so as to avoid root login per
http://backuppc.sourceforge.net/faq/ssh.html#how_can_client_access_as_root_be_avoided

Actually since both machines run Ubuntu, logging into root is difficult.

The faq led me to making a shell script which is the only program
which the backuppcclient user is allowed to execute as root via sudo.


#!/bin/sh -f
exec /usr/bin/rsync --server --sender $*

I'm a little confused about the --server and --sender arguments on the
rsync command.  I can't find this in the backuppc config file as an
rsync argument, and I can't figure out what it does.

The rsync man page doesn't seem to mention it.

The logs for both the successful backup and the failed restore showed
that both --server and --sender are being used on the rsync command
sent to the client via ssh for a backup, and --server is being used on
a restore.

So I wondered why they were in the script recommended by the faq.  To
make a long story short, I removed them from the script, and a single
file restore seems to work.  I'm now attempting a full restore of one
users home directory, and then I guess I'll have to try another
backup.

How I got there:

The xfer log for the backups showed that --server and --sender were
used on the rsync command

This had been working for backups since before the client machine
died, and as I said I got to the point where I could backup the
machine after I rebuild it.

The problem was that I couldn't successfully restore.

I first tried to restore a backed up home directory, but this failed
with what looks like a broken pipe.

Here's the log of that attempt, i've added three lines starting with
----- to indicate where the log starts, where I've removed some stuff
and the end:
------- start of log -----
Contents of file /var/lib/backuppc/pc/bill/RestoreLOG.1, modified
2005-10-25 13:36:23

Running: /usr/bin/ssh -q -l backuppcclient bill sudo ~/bin/rsyncSend
--server --numeric-ids --perms --owner --group --devices --links
--times --block-size=2048 --relative --ignore-times --recursive .
/home/rick/restored/
Xfer PIDs are now 17821
Got remote protocol 29
  restore d 755   500/500        4096 /rick/restored/rick
  restore l 777   500/500          30 /rick/restored/rick/.DCOPserver_bill_:0
  restore   644   500/500          51 /rick/restored/rick/.DCOPserver_bill__0
  restore d 755   500/500        4096 /rick/restored/rick/.GalleryRemote
 ---- Long list of similar lines removed ---
  restore   644   500/500         168
/rick/restored/rick/.beagle/Log/2005-10-06-09-05-53-IndexWebContent
  restore   644   500/500         168
/rick/restored/rick/.beagle/Log/2005-10-06-09-06-11-IndexWebContent
exiting after signal PIPE
Restore failed: aborted by signal=PIPE
---- End of Log ----
I thought that, perhaps the problem was that I was trying to restore
too many files at once, so I decided to try just one small text file. 
This time it fails differently.

---- Start of Log ----
Running: /usr/bin/ssh -q -l backuppcclient bill sudo ~/bin/rsyncSend
--server --numeric-ids --perms --owner --group --devices --links
--times --block-size=2048 --relative --ignore-times --recursive .
/home/rick/restore/
Xfer PIDs are now 18183
Got remote protocol 29
  restore   600   500/500        3843 /rick/restore/nivex.asc
Remote[1]: ERROR: buffer overflow in recv_rules
Remote[1]: rsync error: error allocating core memory buffers (code 22)
at util.c(126)
Read EOF:
Tried again: got 0 bytes
Done: 1 files, 3843 bytes
Restore failed: Unable to read 4 bytes
---- end of log ----

--
Rick DeNatale

Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to