Server Backup
Posted: Mon Mar 05, 2007 3:01 pm
I seem to have a problem running omshut and omrc from within a script. All info below ... anyone have any idea what's wrong. I'm running this through cron.
-rwxrwxrwx 1 root root 770 Nov 13 11:26 scalixbk.sh
[root@mail shell]# cat scalixbk.sh
#! /bin/sh
#
# Script : /opt/shell/scalixbk.sh
#
# This script is used to backup the Scalix files on remote scalix server
# then ftp the tar file to the Windows server to be dumped to the
# daily backup tape later that night
#
date
cd /backup
#
# Shut down Scalix services and show in log status
#
omshut
omstat -a
#
# copy /var/opt/scalix to /backup/scalixrr.tar using tar
#
tar -cvf scalixrr.tar /var/opt/scalix/*
#
# copy /backup/scalixrr.tar to \\s-server\c:\ftp using ftp
#
ftp -n << "ENDFTP"
open 128.85.55.3
user uuuuuuuuu ppppppp
bin
put scalixrr.tar
ls
bye
ENDFTP
#
# Bring Scalix back up
#
omrc
omstat -s
#
cd /backup
ls -al
date
# end of script
[root@mail shell]#
-rwxrwxrwx 1 root root 770 Nov 13 11:26 scalixbk.sh
[root@mail shell]# cat scalixbk.sh
#! /bin/sh
#
# Script : /opt/shell/scalixbk.sh
#
# This script is used to backup the Scalix files on remote scalix server
# then ftp the tar file to the Windows server to be dumped to the
# daily backup tape later that night
#
date
cd /backup
#
# Shut down Scalix services and show in log status
#
omshut
omstat -a
#
# copy /var/opt/scalix to /backup/scalixrr.tar using tar
#
tar -cvf scalixrr.tar /var/opt/scalix/*
#
# copy /backup/scalixrr.tar to \\s-server\c:\ftp using ftp
#
ftp -n << "ENDFTP"
open 128.85.55.3
user uuuuuuuuu ppppppp
bin
put scalixrr.tar
ls
bye
ENDFTP
#
# Bring Scalix back up
#
omrc
omstat -s
#
cd /backup
ls -al
date
# end of script
[root@mail shell]#