1753307 Members
6323 Online
108792 Solutions
New Discussion юеВ

Re: ssh backup Problem

 
SOLVED
Go to solution
HP UNIX Professionals
Frequent Advisor

ssh backup Problem

Hi Experts,

We are seduced the ssh backup in corn in HPUX Box. I am getting error such as. Anybody know why it h

************************************************
** DOING THE BACKUP FOR /data/backup/etc
************************************************
* Doing diff backup
/soft/cfgtool/helper_bin/gnutar.HPUX-11.X-800: Removing leading `/' from absolute path names in the archive
Pseudo-terminal will not be allocated because stdin is not a terminal.
You have no controlling tty. Cannot read confirmation.
ERROR WITH TAR

Thanks & Regards,

VINAY
9 REPLIES 9
Prasanth V Aravind
Trusted Contributor
Solution

Re: ssh backup Problem

check .. does the user password got expired ??

or try to run this script is debug mode & find out where its giving this error ?

Gudluck
Prasanth
Steven Schweda
Honored Contributor

Re: ssh backup Problem

What, exactly, is "the ssh backup in com"?
Some (invisible) shell script?

> [...] HPUX Box.

uname -a

> You have no controlling tty. Cannot read
> confirmation.

Some program (GNU "tar"?) would like to ask
you a question and get an answer, but if you
run this thing as a non-interactive job (as a
"cron" job, for example), then you would have
no terminal where the question-and-answer
session can happen.
HP UNIX Professionals
Frequent Advisor

Re: ssh backup Problem

Hi Prasant,

This is the scritp in corn for ssh backup.

Can u please tell me how to run in DEBUG MODE

=====================
## Backup
#
0 00 * * * /soft/backup/bin/sshbackup



THANKS.

VINAY
HP UNIX Professionals
Frequent Advisor

Re: ssh backup Problem

I run in debug mode by the folling command and i got the output pasted here. pls help me how to find the problem

========csrc80> sh -x /soft/backup/bin/sshbackup
+ CFGTOOL_HOME=/soft/cfgtool
+ . /soft/cfgtool/lib/programs-variables.sh
+ _POSIX2_VERSION=199209
+ export _POSIX2_VERSION
+ SUM_R=/usr/bin/sum -r
+ RSH=/usr/bin/remsh
+ RCP=/usr/bin/rcp
+ COMM=/usr/bin/comm
+ GREP=/usr/bin/grep
+ EGREP=/usr/bin/egrep
+ RM=/usr/bin/rm
+ LOGGER=/usr/bin/logger
+ WC=/usr/bin/wc
+ ECHO=/usr/bin/echo
+ CAT=/usr/bin/cat
+ LS=/usr/bin/ls
+ DF=/usr/bin/bdf
+ AWK=/usr/bin/awk
+ TAR=/usr/bin/tar
+ ZCAT=/usr/bin/zcat
+ CUT=/usr/bin/cut
+ UNIQ=/usr/bin/uniq
+ SORT=/usr/bin/sort
+ CHOWN_R=/usr/bin/chown -hR
+ OWN_DELEM=:
+ CHOWN=/usr/bin/chown -h
+ CHMOD_R=/usr/bin/chmod -R
+ CHMOD=/usr/bin/chmod
+ EXPR=/usr/bin/expr
+ TOUCH=/usr/bin/touch
+ MKDIR=/usr/bin/mkdir
+ RMDIR=/usr/bin/rmdir
+ LN=/usr/bin/ln
+ SED=/usr/bin/sed
+ SLEEP=/usr/bin/sleep
+ BASENAME=/usr/bin/basename
+ COMPRESS=/usr/bin/compress
+ CP=/usr/bin/cp
+ MV=/usr/bin/mv
+ DD=/usr/bin/dd
+ TR=/usr/bin/tr
+ HEAD=/usr/bin/head
+ TAIL=/usr/bin/tail
+ FIND=/usr/bin/find
+ SYMLINKTEST=-h
+ DU=/usr/bin/du -ks
+ DIFF=/usr/bin/diff
+ BC=/usr/bin/bc
+ DATE=/sbin/date
+ TAR_XB=xfbp
+ UNIQ_NR=-u
+ UNIQ_RP=-d
+ + uname -rs
OSVERSION=HP-UX B.11.11
+ COMPRESS=/usr/bin/compress -f
+ + uname -m
+ /usr/bin/cut -c 6
UNAME_M=8
+ [ 8 -eq 8 ]
+ ARCH_TYPE=HPUX-11.X-800
+ GNUTAR=/soft/cfgtool/helper_bin/gnutar.HPUX-11.X-800
+ SSH=/soft/cfgtool/helper_bin/ssh.HPUX-11.X-800
+ BACKUP_SRV=sshbackup.as.qc.bell.ca
+ + /sbin/date +%a
DAY=Thu
+ mkdir /var/backup
+ 2> /dev/null
+ LOGFILE=/var/backup/sshbackup_logs.Thu
+ PID=13682
+ TMPFILE=/tmp/sshbackup.13682
+ VERBOSE=0
+ TESTMODE=0
+ TOTSIZE=0
+ [ x = x-v ]
+ [ x = x-t ]
+ echo
+ 1> /var/backup/sshbackup_logs.Thu
+ echo
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ** FULL OR INCREMENTAL
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ [ -f /var/backup/last-full-backup-timestamp ]
+ [ Thu = Sat ]
+ echo Today is Thu so we'll do a differential backup
+ 1>> /var/backup/sshbackup_logs.Thu
+ FULL=0
+ BACKUPTYPE=diff
+ [ -f /data/backup/server-name ]
+ + cat /data/backup/server-name
BACKUP_SRV=sshbackup-84.as.qc.bell.ca
+ [ 0 -gt 0 ]
+ NEWERTHAN=/var/backup/last-full-backup-timestamp
+ [ ! -d /data/backup/etc ]
+ [ -f /data/backup/etc/encrypt ]
+ + cat /data/backup/etc/encrypt
CRYPT=-c blowfish
+ echo
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ******************************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ** GENERATING LIST FOR /data/backup/etc
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ******************************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ INCLUDE_DIR=/data/backup/etc/list-dir.include
+ [ ! -f /data/backup/etc/list-dir.include ]
+ [ -f /data/backup/etc/list-regex.include ]
+ INCLUDE_FILE=/soft/backup/etc/default.list-regex.include
+ [ -f /data/backup/etc/list-regex.exclude ]
+ EXCLUDE=/data/backup/etc/list-regex.exclude
+ /usr/bin/cat /dev/null
+ 1> /tmp/sshbackup.13682.find
+ KEEPLISTFILE=/tmp/sshbackup.13682.find
+ export KEEPLISTFILE
+ /soft/backup/bin/generate-list /data/backup/etc/list-dir.include /soft/backup/etc/default.list-regex.include /data/backup/etc/list-regex.exclude /var/backup/last-full-backup-timestamp
+ 1>> /var/backup/sshbackup_logs.Thu 2>& 1
+ [ 0 -gt 0 ]
+ [ 0 -gt 0 ]
+ echo
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ************************************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ** DOING THE BACKUP FOR /data/backup/etc
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo ************************************************
+ 1>> /var/backup/sshbackup_logs.Thu
+ echo * Doing diff backup
+ 1>> /var/backup/sshbackup_logs.Thu
+ + /usr/bin/wc -l
+ /usr/bin/awk { print $1 }
+ /usr/bin/cat /tmp/sshbackup.13682.find
COUNT=10
+ [ 0 -eq 0 ]
+ + basename /data/backup/etc
DIRB=etc
+ echo diff (10 files) backup-diff-etc
+ /soft/cfgtool/helper_bin/ssh.HPUX-11.X-800 -l root -o hostname=sshbackup-84.as.qc.bell.ca -q -i /soft/backup/etc/backup-server-ssh-key-log
+ 2> /tmp/sshbackup.13682.ssh-log.2
Suraj K Sankari
Honored Contributor

Re: ssh backup Problem

Hi,
Can you post the script here.

while running any script from corn you need to give full absulate path for each command.

Suraj
Dennis Handly
Acclaimed Contributor

Re: ssh backup Problem

>I run in debug mode by the following command and I got the output pasted here.

It would help if you attached sshbackup so we can see the comments and match the debug output to the source.

I don't see your initial error messages.
It would help if you put "sh -x /soft/backup/bin/sshbackup: in your crontab, or simply add "-x" on your "#!/usr/bin/sh" line.
HP UNIX Professionals
Frequent Advisor

Re: ssh backup Problem

Hi Sunil,

This is the scrip we are running in corm, i am attaching the script.


Thanks,

vinay

Prasanth V Aravind
Trusted Contributor

Re: ssh backup Problem

when you getting error ??

from cron or from shell prompt ??

here i am not able to see any error when you run it on debug mode.

GUdluck
Prasanth
Dennis Handly
Acclaimed Contributor

Re: ssh backup Problem

>This is the scrip we are running in corm

It appears you are getting all the way down to $SSH and then it is hanging/waiting.
echo "$HOSTNAME $BACKUPTYPE ($COUNT files) backup-${BACKUPTYPE}-${DIRB}" | $SSH -l root -o "hostname=${BACKUP_SRV}" -q -i /soft/backup/etc/backup-server-ssh-key-log