FS
Documentation

FAQ

From Documentation

Revision as of 00:15, 5 July 2006; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

Contents

Frequently Asked Questions

Listed below are some of the questions often asked about our products. If the answer you are looking for is not listed below, more information on our products can be found in your documentation, or at the Technical Notes section.

Functional Software reserves the right to change the information in this Frequently Asked Questions list at any time and without notice. If you are unable to find the answer to your problem in the documentation, or on this website, please contact the Functional Support Line.

sentinel3G FAQ


COSmanager

Scheduler (for Version 4.x Applications and Newer)

These Schedule Definitions are valid for COSmanager Framework versions 4 or newer. The Schedules for older versions of the products will still work.

Schedule: Daily - except Thursday Friday

  1. Config > COSmanager configuration > Other tables > schedule
  2. select "70 Daily - except Thursday" > Maintain > Clone
  3. change Order to 75
  4. change Schedule name to "Daily - except Thursday Friday"
  5. press choose on Day(s) and use Ctrl-click to select all days EXCEPT Thursday and Friday
  6. press Accept

Note: the above steps can be followed for any combination of days.

Scheduler (for Version 3.x Applications and Newer)

These Schedules are valid for all current versions of COSmanager Suite products.

How do I define a scheduled time for the last Friday of the month?

Set up a new scheduled time as follows:

Ord:nnn
When:Monthly - last Friday
Schedule Cmd:D1=`cal | tail -c4` ; D2=`expr $D1 - 7` ; db_datemat -d$D2-$D1 -w5 $Today $Start
Crontab string:* * 5
Check cron:yes

On some platforms the flag to tail the command may have to be... tail -4c

How do I define a scheduled time for the last working day of the month

Setup new scheduled time as follows:

Ord:nnn
When:Monthly - last working day
Schedule Cmd:day=`cal | tail -c4` ; last="`date +%Y%m$day`" ; [ "`db_date`" -eq "`db_datemat -p -b -w1-5 $last`" ]
Crontab string:* * *
Check cron:yes

On some platforms the flag to the tail command may have to be ... tail -4c

How do I define a scheduled time for once a fortnight

Setup new scheduled time based on the following:

Example: schedule time for the first Monday each fortnight:

Ord:nnn
When:Fortnightly - 1st Monday
Schedule Cmd:WK=`date +%U` db_datemat -w1 && [ 1 -eq `expr $WK % 2` ]
Crontab string:* * 1
Check cron:yes

Example: schedule time for the second Wednesday each fortnight:

Ord:nnn
When:Fortnightly - 2nd Wednesday
Schedule Cmd:WK=`date +%U` db_datemat -w3 && [ 0 -eq `expr $WK % 2` ]
Crontab string:* * 3
Check cron:yes

Explanation of example Schedule Commands above:

WK=`date +%U` gets the week number for today.
db_datemat -w3 returns true if today is Wednesday. -w0 is Sunday, -w6 is Saturday.
`expr $WK % 2` returns a modulo 2 number, 1 for the first week in a fortnight, and 0 for the second.

How do I define a scheduled time for the last Friday of June and December (6 monthly)

Setup new scheduled time as follows:

Ord:nnn
When:June, Dec - last Friday
Schedule Cmd:D1=`cal | tail -c4` ; D2=`expr $D1 - 7` ; db_datemat -m6,12 -d$D2-$D1 -w5 $Today $Start
Crontab string:* * 5
Check cron:yes

On some platforms the flag to the tail command may have to be ... tail -4c

Backup and Recovery

How do I perform a recovery from a backup without the COSmanager Framework?

Performing a restore without COSmanager can be easily accomplished as all backup methods provided make use of common Unix commands. The formats involved are cpio, tar and dump. However, because of the flexabilty in setting up backups through COSmanager, a backup may be comprised of multiple format tape files, and even accross multiple volumes. Then the main issue in recovering files at the command line level is not so much knowing the commands, but knowing what the layout of a given tape, or set of tapes is. Following are the commands required to recover in full a tape file as backed up using a provided backup method.

Recovery Commands

Let us assume that the format and layout of the backup tape is known. Firstly you need to change directory to the base directory you are about to recover.

cd <base directory>

Secondly, you need to skip to the to the beginning of the appropriate tape file. Remember that the electronic media label is the first tape file. For example, you need to recover /usr which is the third step in your backup, therefore you need to skip to the beginning of the fourth tape file.

mt -f <no-rewind device> fsf 3 

or

mt -t <no-rewind device> fsf 3if 

on HP/UX or

dd if=<no-rewind device> of=/dev/null 

three times. Then recover the tape file according to the backup format as follows. For the standard cpio backup using the FS-wrapper FScpio use the following command to recover in full:

dd if=$Device_nr ibs=<bs> | cpio -icdum 

For the standard tar backup using the FS-wrapper FStar use the following command to recover in full:

dd if=$Device_nr ibs=<bs> | tar xpf - 

For the standard dump backup using the FS-wrapper FSdump use the following command to recover in full:

dd if=$Device_nr ibs=<bs> | ufsrestore xf - 

for SVR4 versions of Unix, or

dd if=$Device_nr ibs=<bs> | restore xf - 

for SVR3 and Berkley versions of Unix. Where <bs> is the blocksize associated with the media type multiplied by 1024. For example, if your DAT media type has a blocksize of 32 kbytes associated with it then <bs> will be 32768.

How do I print a catalogue of my backup tapes?

COSmanager can simplify this by automatically printing a log of a media set contents immediately after a backup has completed. To do this place the following command in the At-end cmd for the backup job definition.

( medrep -d 0 ; FSdrive $Drive list ) | asuser fsadmin $PRINTCMD 

Or you can key in the script shown at the end of this section called ~fs/FSadmin/local/bin/medcat and use the following command in either the At-end cmd or the At-unload cmd of the backup job definition. Remember to make the script executable.

( banner $Set_ID ; medcat $Set_ID ; FSdrive $Drive list ) | asuser fsadmin $PRINTCMD 

An example of this media contents log is shown below. The printout also shows the tape drive operations commands for the backup drive. Knowing these and the devices involved will be useful when, for example, you need to recover /var/spool - the fifth tape file.

Media written in the last 0 days. #1054DAT-hiWritten: 17/08/94Expires: 24/08/94Location: FS
Full backup of gomez using portable cpio
File 217/08/94-00:01full dumpgomez:/
Full backup of /
File 317/08/94-00:13portable full cpiogomez:/usr
Full backup of /usr
File 417/08/94-00:18portable full cpiogomez:/opt
Full backup of /opt
File 517/08/94-00:53full targomez:/var/spool
Full backup of /var/spool
File 617/08/94-02:00 portable full cpiogomez:/local
Full backup of /local
Drivedat (Sun DAT unit)
TypeDAT-hi
Hostgomez
Device/dev/rmt/1
No-rewind device/dev/rmt/1n
Drive namedat
Operator messageDAT drive needs attention
Drive classmt_tape (Tape operations via MT(1) command)

----- Operations ----------------------------------------------------

Statusmt -f $Device_nr status
Rewindmt -f $Device_nr rewind
Skip forwardmt -f $Device_nr fsf $N
Skip backward mt -f $Device_nr bsf $N
Unload mediamt -f $Device_nr offline
Where $Device refers to the device /dev/rmt/1 above and $Device_nr refers to the no-rewind device /dev/rmt/1n. 
In the Skip  forward and Skip backward operation, $N refers to the number of tape files to be skipped.

Script ~fs/FSadmin/local/bin/medcat #! /bin/sh

#
#medcat.sh
#
#Copyright (c) 1991-1994 Functional Software
#All Rights Reserved
#
#Media reports
#
#ident@(#)medcat.sh1.1 (Functional Software - FSadmin) 94/08/30
#

USAGE="Usage: medcat Set_ID" 

if [ -z "$1" ]; then
echo $USAGE >&2
exit 1
fi

SORTPARMS="Written Set_ID Sequence File"
RPTPGM=msetrep.awk

db_sel media "Set_ID == \"$1\" && Usage != \"scratch\"" | \
db_join -n - medcont Number | \
db_sort - $SORTPARMS | \
db_rpt - $APPL_HOME/report/$RPTPGM

How do I accomodate for disaster recovery? (draft)

A backup must contain the following:

  1. file system
  2. COSmanager directory structure
  3. audit trail directory /usr/spool/log

Have on hand the hardcopy catalogue of this tapes contents.

Initially recover the root file system, then COSmanager and the audit trail directory. See FAQ How do I perform a recovery from backup without COSmanager? to do this.

After recovering COSmanager, you must acknowledge the backup job that performed this backup so that the status tables are cleared. For version 2.4.x this done by performing the option Unload media from drive on the Manage removable media jobs menu. For version 2.5.x this is done by performing the option Acknowledge job completion on the Manage removable media jobs menu. This will return COSmanager to the status just after the above backup was completed.

You can now use COSmanager to perform the recovery of the rest of your system. This may mean applying incremental backups to full backups.

How do I perform an interactive dump recovery?

Setup new recovery method as follows:

Method:dump interactive
Description:Recover interactive from dump
Format:dump
Index Command:
Full Recovery:cd $Directory ; ufsrestore -ivf $Device_nr < /dev/tty
Selected Rcvry:
Use STDOUT?no
Remote support?no
Run on host:file_host

How can I get a report detailing steps of all backup jobs run across my Data Center?

Setup an at-request duty that calls the following script:

for host in `db_sel -h hostinfo "Admintype != \"\"" Hostname`;
do
for bujob in `FSremote $host "db_proj -h backup Job`;
do
echo "Host: $host\n\n"
FSremote $host "showback $bujob"
echo "\n\n"
done
done | scroll -H0

How can I get a background backup job to output the log to standard out?

Some people wish to capture the backup log to other than the log file itself. Either for it to be mailed to a user or to be captured by a task/batch scheduler system. This can be done by a minor change to ~fs/FSadmin/bin/FSbackup. Change the line (around line 206 in the background portion of the case statement)

setpgrp runback ${load_now:+-L} "$Drive" $ID "$Job" >$LOG 2>&1 

to

setpgrp runback ${load_now:+-L} "$Drive" $ID "$Job" 2>&1 | tee $LOG

General Questions

How does COSmanager's remote system management affect the security of remotely managed systems? (draft)

To answer this it is necessary to explain how COSmanager manages those systems.

For the purpose of system management, COSmanager defines a host as either a Master, a Remote or a Slave. A Slave system can only administer itself. A Master can administer and any other host marked as Remote or Slave. A Remote system is another Master on the same network. This enables arbitary management domains to be defined.

To administer a Slave, a Master executes commands through a local program called FSremote. This program looks up a communication method, in the comm_meth table, and uses this to execute the command via the FSadmin command on the Slave.

The standard communication method used by COSmanager is rsh. To use this method a .rhosts file is created for the user fsadmin on the Slave systems that allow root or fsadmin access from the Master. In itself, this .rhosts file does not represent a security threat. In version 2.5.2 the fsadmin account is not privileged and users remotely logging in are captured by a .profile and securely put into COSmanager.

The command, FSadmin, is a set UID root program used to either start COSmanager or execute a command passed as a parameter. Running the command CM results in the execution of FSadmin which starts COSmanager. Under normal usage, the FSadmin command performs security checks to validate the user ID and check that they are authorised to use COSmanager. If the FSadmin command is invoked by root or fsadmin and passed a command to execute the normal security checks are bypassed and the command is run as root. This is the case when it is executed by FSremote to manage a remote system.

Normally the slave FSadmin is executed as a request from a COSmanager Master. This ensures that the user on the Master is allowed to run that administration task. However, if the user on the Master can get an fsadmin or a root shell, then they can remotely execute any command on any slave as root. This is possible because the slave does not authenticate that the commands were sent by COSmanager. This means that root on the Master system has root privilages on all the remote systems. Most products currently available on the market do not perform authentication,and so are susceptable to the same problem.

By ensuring that the root account on COSmanager masters is protected from unauthorised use, COSmanager does not introduce further security risks to a network. COSmanager facilitates this by enabling the use of the root account to be minimised.

CPIO versus TAR versus DUMP (draft)

Advantages of CPIO:

Disadvantages of CPIO:

Disadvantages of TAR:

Advantages of DUMP:

Disadvantages of DUMP:

When adding a user to a hostgroup, how do I perform commands on all hosts in the hostgroup?

Following is the code you need in your SetupUser script.

if [ -n "$Access" ]; then
AccessListAll=`db_sel -h acchost "Hostgroup == \"$Access\"" Hostname`
fi

for host in $AccessListAll# execute on each host in access list
do
if [ "$ADMINHOST" = "$host" ]
then
$Command
else
FSremote $host "$Command"
fi
done

"$Command" represents the command you wish to execute.

How do I access COSmanager man pages on the Sequent ptx 2.x port?

The normal method to access COSmanager man pages is to alter the MANPATH environment variable. The operating system Dynix/ptx 2.x does not have or use the MANPATH environment variable.

For ptx, third party software man pages need to be preprocessed (using nroff(1)), packed (using pack(1)) and linked to the standard man page directory. Following is a list of commands to do this for you:

cd $Fshome/man/man1
for MP in `echo *.1`; do
nroff -man $MP > $MP.tmp
pack $MP.tmp
mv $MP.tmp.z $MP.z
ln -s $MP.z /usr/catman/man1/$MP.z
done

$FShome/man/man1 contains COSmanager application related man pages. $FShome/man/manp contain Functional Toolset related man pages