Highlighted
wyldkao Absent Member.
Absent Member.
500 views

Single ZCM Server backup (use sybase)

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)

========================
Labels (2)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: Single ZCM Server backup (use sybase)

Thanks for posting that. I am sure lots of admins will find it helpful.
I took the liberty of commenting for future readers:

zman asc backup -P "administartor's password" - Store the admin
password for future commands.
zman cae - Backup the certificate authority
zman zsb - Backup config files
zman dgc - Get database credentials
zman db - Backup database
zman acc - Clear the stored credentials

It might be a good idea to move the backup tar file somewhere else.


--
Anders Gustafsson (NKP)
The Aaland Islands (N60 E20)

Have an idea for a product enhancement? Please visit:
http://www.novell.com/rms

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.