Novell Cool Solutions

Full Backup Script for Linux GMS

coolguys

By:

March 26, 2008 6:50 am

Reads:6,340

Comments:0

Score:Unrated

Print/PDF

Problem

I want to do a full backup of the Linux GMS, including application parameters, users and groups. How can I do this?

Solution

Here’s a backup script you can use:

#!/bin/bash

#Stoping services

/etc/init.d/mobilesuite stop
/etc/init.d/asadb stop
/etc/init.d/securegateway stop

#Backup IMS directory

tar -czf /backup/backupmobile.tgz /opt/ims/


#Starting services

/etc/init.d/securegateway start
/etc/init.d/asadb start
/etc/init.d/mobilesuite start


#Vérify status of services

/etc/init.d/mobilesuite status
/etc/init.d/asadb status
/etc/init.d/securegateway status

Note that you have to deactivate the cron job during the backup, which restarts services if they are crashed in /etc/crontab

For example:

SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and
cron.monthly
#
-*/15 * * * *   root  test -x /usr/lib/cron/run-crons &&
/usr/lib/cron/run-crons >/dev/null 2>&1

*/1  *1-0* * * *   root   /etc/init.d/mobilesuite restart-if-crashed >
/dev/null 2>&1
*/1  *1-0* * * *   root   /etc/init.d/asadb restart-if-crashed >
/dev/null 2>&1
*/1  *1-0* * * *   root   /etc/init.d/securegateway restart-if-crashed
> /dev/null 2>&1

I do the backup between midnight and 1:00 a.m. – I’ve tested it, and it works well.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Categories: Uncategorized

0

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS