Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
1,693

Hello guys.

Could you help me in a backup shell script sybase iq V16?

I have a backup shell script backup.sh:

##

porta=5000

DT=`date +%Y%m%d_%H:%M:%S`

user=DBA

passw=mypassw

for DBN in databasenameiq

do

DIRBKP=/backups/$DBN

cd $DIRBKP

dbisql -c "UID=$user;PWD=$passw;DBN=$DBN" -host 10.x.xxx.xx -port $porta -nogui <<EOF

backup database to '$DIRBKP/databasenameiq_$DT';

exit;

EOF

#

$DIRBKP/gzip databasenameiq_$DT

done

~

~

And then, I run:

>ksh -x backup.sh

The result is:

+ porta=5000

+ + date +%Y%m%d_%H:%M:%S

DT=20160212_16:10:29

+ user=DBA

+ passw=mypassw

+ DIRBKP=/backups/databasenameiq

+ cd /backups/databasenameiq

+ dbisql -c UID=DBA;PWD=mypassw;DBN=databasenameiq -host 10.x.xxx.xx -port 5000 -nogui

+ 0<<

backup database to '/backups/databasenameiq_20160212_16:10:29';

exit;

(DBA)> Snapshot created.

Execution time: 2,512 seconds

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)>

(DBA)> .....

.......

The exit command does not work, it seems that the execution is in loop.

Someone could tell me what's wrong?

Thanks!

2 Comments
Labels in this area