Hi there all

I have been a BackupPC user for approximately 1 year now. I have only ever
used BackupPC's 'tar' and 'smb' xfer methods. I recently implemented extra
Linux servers at a client and now have the need to back them up. Currently I
am using the 'smb' method to backup the SAMBA shares, but ideally I would
prefer to use the 'rsync' xfer method. I have carefully followed the
following two links in setting up BackupPC and the SSH keys:

  - http://backuppc.sourceforge.net/faq/ssh.html
  - http://www.debianhelp.co.uk/backuppc.htm

The first link on the BackupPC site advises that you test as the BackupPC
user on the server to verify if it works, I did as follows:
---------------------------------------------------------------------------
[EMAIL PROTECTED]:/etc/backuppc# ssh -l root server1 whoami
root
[EMAIL PROTECTED]:/etc/backuppc# su - backuppc
[EMAIL PROTECTED]:~$ ssh -l root server1 whoami
Enter passphrase for key '/var/lib/backuppc/.ssh/id_rsa':
[EMAIL PROTECTED]'s password:
Permission denied, please try again.
[EMAIL PROTECTED]'s password:
----------------------------------------------------------------------------

I am very new to the usage of SSH keys and I am not sure if I have
configured things correctly. I did follow the above links very carefully and
everything else works perfectly.

I found an article on an article somewhere online that I should add the
BackupPC user to the sudoers file, see the /etc/sudoers file below for the
syntax I used:

----------------------------------------------------------------------------------
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
backuppc  ALL=NOPASSWD: /usr/bin/rsync
----------------------------------------------------------------------------------

Below I have inserted the error message that I receive and then also the
server1.pl config file right at the bottom. This will hopefully give you
some insight into my problem. See the log file as follows:

--------------------------------------------------------------------------------------------
File /var/lib/backuppc/pc/server1/XferLOG.bad.z (Extracting only Errors)

Contents of file /var/lib/backuppc/pc/server1/XferLOG.bad.z, modified
2006-12-19 03:02:46 (Extracting only Errors)

Running: /usr/bin/ssh -C -x -l root -o
PreferredAuthentications=publickey server1 /usr/bin/rsync --server
--sender --numeric-ids --perms --owner --group --devices --links
--times --block-size=2048 --recursive --exclude=/proc --exclude=/dev
--exclude=/cdrom --exclude=/media --exclude=/floppy --exclude=/mnt
--exclude=/var/lib/backuppc --exclude=/lost+found --ignore-times .
/etc/
Xfer PIDs are now 13604
Got remote protocol 1836213584
Fatal error (bad version): Permission denied (publickey,password).

Read EOF: Connection reset by peer
Tried again: got 0 bytes
fileListReceive() failed
Done: 0 files, 0 bytes
Got fatal error during xfer (fileListReceive failed)
Backup aborted (fileListReceive failed)

--------------------------------------------------------------------------------------------

I tried running the below that I found in  the log file and it seems
to run fine, therefore I killed the process:

[EMAIL PROTECTED]:/etc/backuppc# /usr/bin/ssh -C -x -l root -o
PreferredAuthentications=publickey server1 /usr/bin/rsync --server
--sender --numeric-ids --perms --owner --group --devices --links
--times --block-size=2048 --recursive --exclude=/proc --exclude=/dev
--exclude=/cdrom --exclude=/media --exclude=/floppy --exclude=/mnt
--exclude=/var/lib/backuppc --exclude=/lost+found --ignore-times .
/etc/
Killed by signal 2.

See the server1.pl config file as follows:

--------------------------------------------------------------------------------------------
File /etc/backuppc/server1.pl

Contents of file /etc/backuppc/server1.pl, modified 2006-12-19 02:35:06

# Minimum period in days between full and incremental backups:
$Conf{FullPeriod}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bfullperiod%7d>
= 6.97;
$Conf{IncrPeriod}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bincrperiod%7d>
= 0.97;

# Number of full and incremental backups to keep:
$Conf{FullKeepCnt}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bfullkeepcnt%7d>
= 2;
$Conf{IncrKeepCnt}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bincrkeepcnt%7d>
= 6;
# Note that additional fulls will be kept for as long as is necessary
# to support remaining incrementals.

# What transport to use backup the client [smb|rsync|rsyncd|tar|archive]:
$Conf{XferMethod}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bxfermethod%7d>
= 'rsync';

# The file system path or the name of the rsyncd module to backup when
# using rsync/rsyncd:
$Conf{RsyncShareName}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7brsyncsharename%7d>
= ['/etc', '/data/corporate', '/ekasi'];

# If this is defined only these files/paths will be included in the backup:
$Conf{BackupFilesOnly}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bbackupfilesonly%7d>
= undef;

# These files/paths will be excluded from the backup:
$Conf{BackupFilesExclude}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bbackupfilesexclude%7d>
= ['/proc', '/dev', '/cdrom', '/media', '/floppy', '/mnt',
'/var/lib/backuppc', '/lost+found'];

# Level of verbosity in Xfer log files:
$Conf{XferLogLevel}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bxferloglevel%7d>
= 1;

# Commands to run for client backups:
# Note the use of SSH's -C attribute. This enables compression in SSH.
$Conf{RsyncClientCmd}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7brsyncclientcmd%7d>
= '$sshPath -C -x -l root -o PreferredAuthentications=publickey $host
$rsyncPath $argList+';

# Commands to run for client direct restores:
# Note the use of SSH's -C attribute. This enables compression in SSH.
$Conf{RsyncClientRestoreCmd}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7brsyncclientrestorecmd%7d>
= '$sshPath -C -q -x -l root $host $rsyncPath $argList+';

# Compression level to use on files. 0 means no compression. See notes
# in main config file before changing after backups have already been done.
$Conf{CompressLevel}
<http://strika.kicks-ass.org/backuppc/index.cgi?action=view&type=docs#item_%24conf%7bcompresslevel%7d>
= 1;

--------------------------------------------------------------------------------------------
Kind Regards
-- -- -- -- -- -- --
Ashley Shaw
LightSpeedDevelopment
-- -- -- -- -- -- -- -- -- -- -- --
Office: +27 21 448 9843
Fax: +27 21 447 9561
Tech Support: +27 21 448 9570
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Visit: 46 Devon Street – Woodstock – Cape Town – 7925
Snail Mail: P.O.Box. 1172 – Woodstock – Cape Town - 7915
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- --
Main Email: [EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
GTalk: [EMAIL PROTECTED]
Skype: lightspeeddevelopment
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- ---- -- -- -- -- --
This e-mail is privileged and confidential and is for the addressee only.
Unauthorised copying, distribution or dissemination is strictly prohibited.
If you have received this communication in error, please notify us and
destroy this original message immediately.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to