Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not print each files restores by TSM in main output #1797

Merged
merged 2 commits into from
May 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion usr/share/rear/restore/TSM/default/400_restore_with_tsm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In usr/share/rear/restore/NETFS/default/400_restore_backup.sh we have

    (   case "$BACKUP_PROG" in
            (tar)
        ...
        esac >"${TMP_DIR}/${BACKUP_PROG_ARCHIVE}-restore.log"

which results a /tmp/rear.XXX/tmp/backup-restore.log file
so that I suggest to use same kind of file name also for TSM i.e.

... 1>"$TMP_DIR/TSM-restore.log" ...

or perhaps even instead of the hardcoded TSM
some kind of BACKUP_PROG_ARCHIVE equivalent for TSM
if such a variable exists.

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.
Expand Down