I use the attached script.  It's loosly based on something found
packaged with SGE a while back, but didn't fit my needs.

On Mon, Jul 16, 2012 at 04:37:03PM -0400, Joseph Farran wrote:
Howdy.

Is there a way to save the entire Open Grid Engine configuration to a file ( 
text hopefully )?

In Torque one can save the entire Torque configuration with a: qmgr -c 'p s' > 
file

Is there such a command in OGE?      If not, what is the recommended way to 
backup the configuration files?  Tar backups?

Joseph
_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

--
Jesse Becker
NHGRI Linux support (Digicon Contractor)
#!/bin/sh

#Source the profile script, to set SGE_ROOT, etc.
# Otherwise, set it by hand.
. /etc/profile.d/sge.sh

# Alter as needed.
TMPDIR=./BACKUPS/SGE_BACKUP.$SGE_CELL.`date "+%Y%m%d"`
mkdir -p $TMPDIR
cd $TMPDIR

set -C

function log {
    echo "Backing up [$*]"
}

# Backups the queues
for queue in `qconf -sql`; do 
    qconf -sq $queue > queue_$queue
    log queue $queue
done

for hostgroup in `qconf -shgrpl`; do
    qconf -shgrp_tree $hostgroup > hostgroup_${hostgroup/@/}
    log hostgroup  $hostgroup
done

#And the default queue
log queue default
qconf -sq > queue_default

log cluster configuration
qconf -sconf > cluster_conf

log scheduler configuration
qconf -ssconf > sched_conf

log complexes
qconf -sc > complexes

log sharetree
qconf -sstree > share_tree

log usersets
qconf -sul | sort > userset_list

log users
qconf -suserl | sort > user_list

log managers
qconf -sm | sort > manager_list

log operators
qconf -so | sort > operator_list

log RQS 
qconf -srqs > resource_quotas

for pe in `qconf -spl`; do 
    log PE $pe
        qconf -sp $pe > pe_$pe
done

for project in `qconf -sprjl`; do 
    log project $project
        qconf -sprj $project > project_$project
done

for su in `qconf -sul`; do 
    log user list $su
        qconf -su $su > ul_$su
done

for e in `qconf -sel`; do 
    log exec host $e
        qconf -se $e > exec_$e
done

log exec host global
qconf -se global > exec_global

log job sequence numbers
cp $SGE_ROOT/$SGE_CELL/spool/qmaster/jobseqnum .
cp $SGE_ROOT/$SGE_CELL/spool/qmaster/arseqnum .

cd -

#gzip -9r $TMPDIR
echo "Making tarball..."
tar cjf ${TMPDIR}.tar.bz2 $TMPDIR -C `dirname $TMPDIR` && rm -rf $TMPDIR
_______________________________________________
users mailing list
users@gridengine.org
https://gridengine.org/mailman/listinfo/users

Reply via email to