Re: [BackupPC-users] rsyncd via ssh-redirected port
Les Mikesell schrieb: Guido Schmidt wrote: So, what could cause BackupPC not to connect to the tunnel? I may have missed something in the thread, but did you change the ping command to something that would succeed? Yes. The host is publicly available, I just put it's real name into $Conf{PingCmd} = '$pingPath -c 1 -w 3 host.example.com'; (Have a look at my first posting.) Guido -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Chris Robertson schrieb: Guido Schmidt wrote: Matthias Meyer schrieb: Guido Schmidt wrote: Matthias Meyer wrote: Guido Schmidt wrote: What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? The ssh-connection works (authenticated via public key). The password I refered to is for connecting to rsyncd and that is stored in $Conf{RsyncdPasswd}. It seems that backuppc does not reach the point where it actually tries to connect to rsync daemon. There are no entries in the rsyncd-log (there are when I use the rsync-command above). How can I find out more what happens and what not? I don't really know what the problem :-( You can increase the loglevel with $Conf{XferLogLevel}. I already increased it to 6, but that didn't give any more details. What happens if you start your tunnel interactive and leave DumpPreUser as well as CmdDumpPostUserCmd empty. Okay, we're getting closer. That way the backup worked. So I either get BackupPC to open the tunnel or to do the backup. That's odd. I'd try giving an explicit exit value upon successful tunnel creation. ... --- /usr/local/bin/sshtunnelcontrol.orig2009-12-22 03:16:34.0 -0900 +++ /usr/local/bin/sshtunnelcontrol 2009-12-22 03:17:09.0 -0900 @@ -27,6 +27,9 @@ if ! ps -ef|grep -E ^backuppc $PID ; then echo $PRG_NAME: Error: Tunnel does not exist exit 1 + else +echo $PRG_NAME: Info: Tunnel exists +exit 0 fi else echo $PRG_NAME: Error: ${PIDFILE} already exists. Although the script should already return 0 upon successfull completion (and it does, I tried with echo ?) I'm so desperate I gave it a try, but no, that didn't help. So, what could cause BackupPC not to connect to the tunnel? -- Schalloch Musikhandel GmbH Percussionsabteilung Firmensitz: Karolinenstraße 4-5, 20357 Hamburg Registergericht: Amtsgericht Hamburg, HRB 22770 Geschäftsführer: Christoph Scheffler Tel 040-43 84 94 Fax 040-430 29 47 Öffnungszeiten: Mo-Mi 10-19 Uhr Do+Fr 10-20 Uhr Sa10-16 Uhr Sie erreichen mich: Mo 13-19 Uhr Di 10-19 Uhr Do 11-20 Uhr Jeden 2. Sa 10-16 Uhr -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Guido Schmidt wrote: I'd try giving an explicit exit value upon successful tunnel creation. ... --- /usr/local/bin/sshtunnelcontrol.orig2009-12-22 03:16:34.0 -0900 +++ /usr/local/bin/sshtunnelcontrol 2009-12-22 03:17:09.0 -0900 @@ -27,6 +27,9 @@ if ! ps -ef|grep -E ^backuppc $PID ; then echo $PRG_NAME: Error: Tunnel does not exist exit 1 + else +echo $PRG_NAME: Info: Tunnel exists +exit 0 fi else echo $PRG_NAME: Error: ${PIDFILE} already exists. Although the script should already return 0 upon successfull completion (and it does, I tried with echo ?) I'm so desperate I gave it a try, but no, that didn't help. So, what could cause BackupPC not to connect to the tunnel? I may have missed something in the thread, but did you change the ping command to something that would succeed? -- Les Mikesell lesmikes...@gmail.com -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Matthias Meyer schrieb: Guido Schmidt wrote: Matthias Meyer wrote: Guido Schmidt wrote: What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? The ssh-connection works (authenticated via public key). The password I refered to is for connecting to rsyncd and that is stored in $Conf{RsyncdPasswd}. It seems that backuppc does not reach the point where it actually tries to connect to rsync daemon. There are no entries in the rsyncd-log (there are when I use the rsync-command above). How can I find out more what happens and what not? I don't really know what the problem :-( You can increase the loglevel with $Conf{XferLogLevel}. I already increased it to 6, but that didn't give any more details. What happens if you start your tunnel interactive and leave DumpPreUser as well as CmdDumpPostUserCmd empty. Okay, we're getting closer. That way the backup worked. So I either get BackupPC to open the tunnel or to do the backup. That's odd. Why do you need the identification by rsync? I would believe you can trust your ssh-tunnel and dont't need an additional authentication. There a users with shell-access to that host. Not protecting the port would give them read-access to the whole file-system. Guido -- Schalloch Musikhandel GmbH Percussionsabteilung Firmensitz: Karolinenstraße 4-5, 20357 Hamburg Registergericht: Amtsgericht Hamburg, HRB 22770 Geschäftsführer: Christoph Scheffler Tel 040-43 84 94 Fax 040-430 29 47 Öffnungszeiten: Mo-Mi 10-19 Uhr Do+Fr 10-20 Uhr Sa10-16 Uhr Sie erreichen mich: Mo 13-19 Uhr Di 10-19 Uhr Do 11-20 Uhr Jeden 2. Sa 10-16 Uhr -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Guido Schmidt wrote: Matthias Meyer schrieb: Guido Schmidt wrote: Matthias Meyer wrote: Guido Schmidt wrote: What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? The ssh-connection works (authenticated via public key). The password I refered to is for connecting to rsyncd and that is stored in $Conf{RsyncdPasswd}. It seems that backuppc does not reach the point where it actually tries to connect to rsync daemon. There are no entries in the rsyncd-log (there are when I use the rsync-command above). How can I find out more what happens and what not? I don't really know what the problem :-( You can increase the loglevel with $Conf{XferLogLevel}. I already increased it to 6, but that didn't give any more details. What happens if you start your tunnel interactive and leave DumpPreUser as well as CmdDumpPostUserCmd empty. Okay, we're getting closer. That way the backup worked. So I either get BackupPC to open the tunnel or to do the backup. That's odd. I'd try giving an explicit exit value upon successful tunnel creation. ... --- /usr/local/bin/sshtunnelcontrol.orig2009-12-22 03:16:34.0 -0900 +++ /usr/local/bin/sshtunnelcontrol 2009-12-22 03:17:09.0 -0900 @@ -27,6 +27,9 @@ if ! ps -ef|grep -E ^backuppc $PID ; then echo $PRG_NAME: Error: Tunnel does not exist exit 1 + else +echo $PRG_NAME: Info: Tunnel exists +exit 0 fi else echo $PRG_NAME: Error: ${PIDFILE} already exists. ... Why do you need the identification by rsync? I would believe you can trust your ssh-tunnel and dont't need an additional authentication. There a users with shell-access to that host. Not protecting the port would give them read-access to the whole file-system. Guido Chris -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Matthias Meyer wrote: Guido Schmidt wrote: What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? The ssh-connection works (authenticated via public key). The password I refered to is for connecting to rsyncd and that is stored in $Conf{RsyncdPasswd}. It seems that backuppc does not reach the point where it actually tries to connect to rsync daemon. There are no entries in the rsyncd-log (there are when I use the rsync-command above). How can I find out more what happens and what not? -- Schalloch Musikhandel GmbH Percussionsabteilung Firmensitz: Karolinenstraße 4-5, 20357 Hamburg Registergericht: Amtsgericht Hamburg, HRB 22770 Geschäftsführer: Christoph Scheffler Tel 040-43 84 94 Fax 040-430 29 47 Öffnungszeiten: Mo-Mi 10-19 Uhr Do+Fr 10-20 Uhr Sa10-16 Uhr Sie erreichen mich: Mo 13-19 Uhr Di 10-19 Uhr Do 11-20 Uhr Jeden 2. Sa 10-16 Uhr -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] rsyncd via ssh-redirected port
Guido Schmidt wrote: Matthias Meyer wrote: Guido Schmidt wrote: What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? The ssh-connection works (authenticated via public key). The password I refered to is for connecting to rsyncd and that is stored in $Conf{RsyncdPasswd}. It seems that backuppc does not reach the point where it actually tries to connect to rsync daemon. There are no entries in the rsyncd-log (there are when I use the rsync-command above). How can I find out more what happens and what not? I don't really know what the problem :-( You can increase the loglevel with $Conf{XferLogLevel}. What happens if you start your tunnel interactive and leave DumpPreUser as well as CmdDumpPostUserCmd empty. Try your interactive: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ If it work, start a backup via BackupPC. Why do you need the identification by rsync? I would believe you can trust your ssh-tunnel and dont't need an additional authentication. br Matthias -- Don't Panic -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
[BackupPC-users] rsyncd via ssh-redirected port
Dear backuppc-users, I'm happily using BackupPC 3.1.0 for quite a while. I'm now trying to backup a public host (host.example.com) via an ssh-redirected port. I don't allow any command execution on that host (and therefore cannot use the wait command), so I wrote a script (sshtunnelcontrol, see below) to open and close the tunnel when needed. It is called as DumpPreUserCmd and DumpPostUserCmd. What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ XferMethod is rsyncd. RsyncdClientPort is set to 873. I double-checked the password in /etc/BackupPC/pc/host.example.com.pl. Running /usr/local/BackupPC/bin/BackupPC_dump -v -f host.example.com didn't give more information. Thank you for any hint. Guido --- Begin of file /local/backup/pc/host.example.com/XferLOG.bad.z, modified 2009-12-17 19:50:13 --- Executing DumpPreUserCmd: /usr/local/bin/sshtunnelcontrol start host.example.com /usr/bin/ssh -CN 32323 localhost 873 backuppc 43868 SSH Tunnel Control: Opening tunnel SSH Tunnel Control: /usr/bin/ssh -CN -L 32323:localhost:873 -l backuppc -p 43868 host.example.com SSH Tunnel Control: Process ID is 24538 SSH Tunnel Control: Created /home/backuppc/sshtunnel-host.example.com.pid SSH Tunnel Control: Checking for tunnel: backuppc 24538 24537 0 19:50 ?00:00:00 /usr/bin/ssh -CN -L 32323:localhost:873 -l backuppc -p 43868 host.example.com incr backup started back to 2009-11-24 15:50:34 (backup #0) for directory Alles Error connecting to rsync daemon at localhost:32323: inet connect: Verbindungsaufbau abgelehnt Executing DumpPostUserCmd: /usr/local/bin/sshtunnelcontrol stop host.example.com SSH Tunnel Control: Killing Process 24538 SSH Tunnel Control: Done SSH Tunnel Control: Deleting /home/backuppc/sshtunnel-host.example.com.pid SSH Tunnel Control: Done Got fatal error during xfer (inet connect: Verbindungsaufbau abgelehnt) Backup aborted (inet connect: Verbindungsaufbau abgelehnt) --- End of file /local/backup/pc/host.example.com/XferLOG.bad.z, modified 2009-12-17 19:50:13 --- Begin /etc/BackupPC/pc/host.example.com.pl -- $Conf{PingMaxMsec} = 400; $Conf{RsyncArgs} = [ '--numeric-ids', '--perms', '--owner', '--group', '-D', '--links', '--hard-links', '--times', '--block-size=2048', '--recursive', '--checksum-seed=32761' ]; $Conf{RsyncShareName} = [ 'Alles' ]; $Conf{XferLogLevel} = 3; $Conf{XferMethod} = 'rsyncd'; $Conf{RsyncdUserName} = 'backuppc'; $Conf{DumpPreUserCmd} = '/usr/local/bin/sshtunnelcontrol start $client $sshPath -CN 32323 $host 873 backuppc 12345'; $Conf{DumpPostUserCmd} = '/usr/local/bin/sshtunnelcontrol stop $client'; $Conf{RsyncdClientPort} = 32323; $Conf{ClientNameAlias} = 'localhost'; $Conf{RsyncdPasswd} = ''; $Conf{UserCmdCheckStatus} = '1'; $Conf{PingCmd} = '$pingPath -c 1 -w 3 host.example.com'; End /etc/BackupPC/pc/host.example.com.pl -- Begin /usr/local/bin/sshtunnelcontrol -- #!/bin/sh TODO=$1 CLIENT=$2 SSH_PATH=$3 SSH_OPTS=$4 SSH_TUNNEL_PORT=$5 SSH_HOST=$6 RSYNC_PORT=$7 SSH_USER=$8 SSH_PORT=$9 PRG_NAME=SSH Tunnel Control BASEDIR=/home/backuppc PIDFILE=${BASEDIR}/sshtunnel-${CLIENT}.pid case $TODO in start) if [ ! -e ${PIDFILE} ]; then echo $PRG_NAME: Opening tunnel echo $PRG_NAME: $SSH_PATH $SSH_OPTS -L $SSH_TUNNEL_PORT:$SSH_HOST:$RSYNC_PORT -l $SSH_USER -p $SSH_PORT $CLIENT $SSH_PATH $SSH_OPTS -L $SSH_TUNNEL_PORT:$SSH_HOST:$RSYNC_PORT -l $SSH_USER -p $SSH_PORT $CLIENT 1/dev/null 2/dev/null #$SSH_PATH $SSH_OPTS -L $SSH_TUNNEL_PORT:$SSH_HOST:$RSYNC_PORT -l $SSH_USER -p $SSH_PORT $CLIENT PID=$! echo $PRG_NAME: Process ID is $PID echo $PID ${PIDFILE} echo $PRG_NAME: Created ${PIDFILE} echo $PRG_NAME: Checking for tunnel: if ! ps -ef|grep -E ^backuppc $PID ; then echo $PRG_NAME: Error: Tunnel does not exist exit 1 fi else echo $PRG_NAME: Error: ${PIDFILE} already exists. exit 2 fi ;; stop) if [ ! -e ${PIDFILE} ]; then echo $PRG_NAME: Error: Can not find process. $PIDFILE is missing. exit 3 else PID2KILL=`cat ${PIDFILE}` echo $PRG_NAME: Killing Process $PID2KILL kill -15 $PID2KILL echo $PRG_NAME: Done echo $PRG_NAME: Deleting $PIDFILE rm $PIDFILE echo $PRG_NAME: Done fi ;; *) echo $PRG_NAME: Parameter-error exit 4 ;; esac End /usr/local/bin/sshtunnelcontrol -- -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's
Re: [BackupPC-users] rsyncd via ssh-redirected port
Guido Schmidt wrote: Dear backuppc-users, I'm happily using BackupPC 3.1.0 for quite a while. I'm now trying to backup a public host (host.example.com) via an ssh-redirected port. I don't allow any command execution on that host (and therefore cannot use the wait command), so I wrote a script (sshtunnelcontrol, see below) to open and close the tunnel when needed. It is called as DumpPreUserCmd and DumpPostUserCmd. What works? The opening and closing of the tunnel. What does not? The connection to it. Nothing in the rsyncd-logs on host.example.com. If I leave DumpPostUserCmd empty the tunnel stays open and I can use it with rsync as user backuppc on a shell providing the password by hand: rsync -av --list-only --port=32323 backu...@localhost::Alles /home/backuppc/test/ Do you provide the password during your script? I don't know how BackupPC can know the password for the ssh connection. I believe $Conf{RsyncdUserName} and $Conf{RsyncdPasswd} refers to the rsync secrets and not to the ssh connection. I would suggest to use public/private key for ssh. br Matthias -- Don't Panic -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/