Skip to content

Commit

Permalink
Additional checks for i386, x8664 and ia64 platform only where the Data
Browse files Browse the repository at this point in the history
Protector GUI is available. Add support for platforms such as ppc64.
  • Loading branch information
sebastian-koehler committed Nov 30, 2020
1 parent 3beaabe commit 317a831
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 20 deletions.
17 changes: 12 additions & 5 deletions usr/share/rear/prep/DP/default/450_check_dp_client_configured.sh
@@ -1,6 +1,8 @@
# 450_check_dp_client_configured.sh
# this script has a simple goal: check if this client system has been properly
# configured on the Cell Manager and backed up at least once - no more no less
# Required Data Protector User Interface only available on i386, x86_64 and ia64
# Make this work on ppc64 without the User Interface installed

OMNIDB=/opt/omni/bin/omnidb
OMNIR=/opt/omni/bin/omnir
Expand All @@ -10,9 +12,14 @@ Log "Backup method is DP: check Data Protector requirements"
test -x $VBDA || Error "Cannot execute $VBDA
Install Data Protector Disk Agent (DA component) on the client."

test -x $OMNIR || Error "Cannot execute $OMNIR
Install Data Protector User Interface (CC component) on the client."
if [ $ARCH == "Linux-i386" ] || [ $ARCH == "Linux-x86_64" ] || [ $ARCH == "Linux-ia64" ]; then
test -x $OMNIR || Error "Cannot execute $OMNIR
Install Data Protector User Interface (CC component) on the client."

$OMNIDB -filesystem | grep $( hostname ) || Error "Data Protector check failed, error code $?.
Check if the user root is configured in Data Protector UserList and if backups for this client exist in the IDB.
See $RUNTIME_LOGFILE for more details."
$OMNIDB -filesystem | grep $( hostname ) || Error "Data Protector check failed, error code $?.
Check if the user root is configured in Data Protector UserList and backups for this client exist in the IDB.
See $RUNTIME_LOGFILE for more details."
else
LogPrint "Data Protector User Interface (CC component) not supported on $ARCH."
LogPrint "Additional checks skipped. Restore can be done using Data Protector GUI only."
fi
10 changes: 5 additions & 5 deletions usr/share/rear/restore/DP/default/450_restore_via_gui.sh
Expand Up @@ -7,13 +7,13 @@ Log "Request for a manual restore via the GUI"

LogUserOutput "
**********************************************************************
** Please try to restore the backup from Data Protector GUI!
** Make sure you select \"overwrite\" (destination tab) and make the
** new destination $TARGET_FS_ROOT.
** When the restore is complete press ANY key to continue!
* The Data Protector client is available on the network. Restore a
* backup from the Data Protector GUI. Make sure you select \"overwrite\"
* from Destination tab and $TARGET_FS_ROOT as destination.
*
* When the restore is complete press ANY key to continue!
**********************************************************************
"
# Use the original STDIN STDOUT and STDERR when 'rear' was launched by the user
# because 'read' outputs non-error stuff also to STDERR (e.g. its prompt):
read answer 0<&6 1>&7 2>&8

11 changes: 7 additions & 4 deletions usr/share/rear/verify/DP/default/400_verify_dp.sh
Expand Up @@ -6,7 +6,10 @@
test -s /etc/opt/omni/client/cell_server || Error "Data Protector Cell Manager not configured in /etc/opt/omni/client/cell_server"
CELL_SERVER="$( cat /etc/opt/omni/client/cell_server )"

OMNICHECK=/opt/omni/bin/omnicheck
# check that the Cell Manager is responding on the INET port
${OMNICHECK} -patches -host ${CELL_SERVER} || Error "Data Protector Cell Manager is not responding, error code $?.
See $RUNTIME_LOGFILE for more details."
if [ $ARCH == "Linux-i386" ] || [ $ARCH == "Linux-x86_64" ] || [ $ARCH == "Linux-ia64" ]; then
OMNICHECK=/opt/omni/bin/omnicheck

# check that the Cell Manager is responding on the INET port
${OMNICHECK} -patches -host ${CELL_SERVER} || Error "Data Protector Cell Manager is not responding, error code $?.
See $RUNTIME_LOGFILE for more details."
fi
18 changes: 12 additions & 6 deletions usr/share/rear/verify/DP/default/450_request_gui_restore.sh
Expand Up @@ -6,12 +6,18 @@
# ensure the flag DP GUI restore request does not exists
rm -f $TMP_DIR/DP_GUI_RESTORE

unset REPLY
# Use the original STDIN STDOUT and STDERR when rear was launched by the user
# to get input from the user and to show output to the user (cf. _input-output-functions.sh):
read -t $WAIT_SECS -r -n 1 -p "press 'G' to fall back to Data Protector GUI-based restore [$WAIT_SECS secs]: " 0<&6 1>&7 2>&8
if [ $ARCH == "Linux-i386" ] || [ $ARCH == "Linux-x86_64" ] || [ $ARCH == "Linux-ia64" ]; then
unset REPLY
# Use the original STDIN STDOUT and STDERR when rear was launched by the user
# to get input from the user and to show output to the user (cf. _input-output-functions.sh):
read -t $WAIT_SECS -r -n 1 -p "press 'G' to fall back to Data Protector GUI-based restore [$WAIT_SECS secs]: " 0<&6 1>&7 2>&8

if test "$REPLY" = "g" -o "$REPLY" = "G" ; then
Log "Data Protector GUI restore requested"
if test "$REPLY" = "g" -o "$REPLY" = "G" ; then
Log "Data Protector GUI restore requested"
> $TMP_DIR/DP_GUI_RESTORE
fi
else
LogPrint "Data Protector User Interface (CC component) not supported on $ARCH."
LogPrint "Additional checks skipped. Restore can be done using Data Protector GUI only."
> $TMP_DIR/DP_GUI_RESTORE
fi

0 comments on commit 317a831

Please sign in to comment.