Hi All
Beblow is my ZCM Server Schedule backup script, Wish it could help whom need.

wyldkao

===============
#! /bin/bash
# "test -d /backup/ZCM$(date +\%Y\%m\%d) && echo 'exist'|| echo 'Not exist'" ans
test -d /zcmap/backup/ZCM$(date +\%Y\%m\%d)&& folderexist="exist"|| folderexist="nonexist"
echo "$folderexist"
if [ "$folderexist" = "nonexist" ]; then
mkdir /zcmap/backup/ZCM$(date +\%Y\%m\%d)
else
echo "this folder has exist"
fi
cd /zcmap/backup/ZCM$(date +\%Y\%m\%d)
pwd
zman asc backup -P "administartor's password"
echo 1234567890 | zman cae rootca.bak
echo 1234567890 | zman zsb tpezcmdb.bak
mkdir /zcmap/backup/ZCM$(date +\%Y\%m\%d)/sybase
cd /zcmap/backup/ZCM$(date +\%Y\%m\%d)/sybase
zman dgc > /zcmap/backup/ZCM$(date +\%Y\%m\%d)/sybase/admin.txt
zman db /zcmap/backup/ZCM$(date +\%Y\%m\%d)/sybase
zman acc
sleep 300
cd /
tar zcvf /zcmap/backup/ZCM$(date +\%Y\%m\%d).tar.gz /zcmap/backup/ZCM$(date +\%Y\%m\%d) /var/opt/novell/zenworks/content-repo/content /opt/novell/zenworks/install/downloads/setup
rm -rf /zcmap/backup/ZCM$(date +\%Y\%m\%d)

========================