From f7e4302b6928da2e7fde5ce3d0db5ee2d7dd8f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chabrolles?= Date: Mon, 7 May 2018 14:38:48 +0200 Subject: [PATCH 1/2] Do not print each files restores by TSM in main output - improve ReaR output readability - redirect TSM output to external logfile --- usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh b/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh index 076cef8d14..a1e878948d 100644 --- a/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh +++ b/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh @@ -10,8 +10,9 @@ for num in $TSM_RESTORE_FILESPACE_NUMS ; do test "${filespace:0-1}" == "/" || filespace="$filespace/" LogUserOutput "Restoring TSM filespace $filespace" Log "Running 'LC_ALL=$LANG_RECOVER dsmc restore $filespace $TARGET_FS_ROOT/$filespace -subdir=yes -replace=all -tapeprompt=no ${TSM_DSMC_RESTORE_OPTIONS[@]}'" + Log "File restore progression can be followed with tail -f \"$TMP_DIR/TSM_restore.log\"" # Regarding usage of '0<&6 1>&7 2>&8' see "What to do with stdin, stdout, and stderr" in https://github.com/rear/rear/wiki/Coding-Style - LC_ALL=$LANG_RECOVER dsmc restore "$filespace" "$TARGET_FS_ROOT/$filespace" -subdir=yes -replace=all -tapeprompt=no "${TSM_DSMC_RESTORE_OPTIONS[@]}" 0<&6 1>&7 2>&8 + LC_ALL=$LANG_RECOVER dsmc restore "$filespace" "$TARGET_FS_ROOT/$filespace" -subdir=yes -replace=all -tapeprompt=no "${TSM_DSMC_RESTORE_OPTIONS[@]}" 0<&6 1>"$TMP_DIR/TSM_restore.log" 2>&8 dsmc_exit_code=$? # When 'dsmc restore' results a non-zero exit code inform the user but do not abort the whole "rear recover" here # because it could be an unimportant reason why 'dsmc restore' finished with a non-zero exit code. From 3c7d80d44fa2229b6147cef82a2ba4e961e10069 Mon Sep 17 00:00:00 2001 From: Sebastien Chabrolles Date: Tue, 8 May 2018 11:17:46 +0200 Subject: [PATCH 2/2] rename log to TSM-restore.log --- usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh b/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh index a1e878948d..4ed1e9618b 100644 --- a/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh +++ b/usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh @@ -10,9 +10,9 @@ for num in $TSM_RESTORE_FILESPACE_NUMS ; do test "${filespace:0-1}" == "/" || filespace="$filespace/" LogUserOutput "Restoring TSM filespace $filespace" Log "Running 'LC_ALL=$LANG_RECOVER dsmc restore $filespace $TARGET_FS_ROOT/$filespace -subdir=yes -replace=all -tapeprompt=no ${TSM_DSMC_RESTORE_OPTIONS[@]}'" - Log "File restore progression can be followed with tail -f \"$TMP_DIR/TSM_restore.log\"" + Log "File restore progression can be followed with tail -f \"$TMP_DIR/TSM-restore.log\"" # Regarding usage of '0<&6 1>&7 2>&8' see "What to do with stdin, stdout, and stderr" in https://github.com/rear/rear/wiki/Coding-Style - LC_ALL=$LANG_RECOVER dsmc restore "$filespace" "$TARGET_FS_ROOT/$filespace" -subdir=yes -replace=all -tapeprompt=no "${TSM_DSMC_RESTORE_OPTIONS[@]}" 0<&6 1>"$TMP_DIR/TSM_restore.log" 2>&8 + LC_ALL=$LANG_RECOVER dsmc restore "$filespace" "$TARGET_FS_ROOT/$filespace" -subdir=yes -replace=all -tapeprompt=no "${TSM_DSMC_RESTORE_OPTIONS[@]}" 0<&6 1>"$TMP_DIR/TSM-restore.log" 2>&8 dsmc_exit_code=$? # When 'dsmc restore' results a non-zero exit code inform the user but do not abort the whole "rear recover" here # because it could be an unimportant reason why 'dsmc restore' finished with a non-zero exit code.