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

Conversation

schabrolles
Copy link
Member

Relax-and-Recover (ReaR) Pull Request Template

Please fill in the following items before submitting a new pull request:

Pull Request Details:
  • Type: Enhancement

  • Impact: Low

  • Reference to related issue (URL):

  • How was this pull request tested?

  • SLES12SP2 on POWER with TSM
  • Brief description of the changes in this pull request:

By default, TSM logs every file restored in the main output.
This produces a huge and difficult to read ReaR logfile.
The purpose of this PR is to

  • improve ReaR output readability
  • redirect TSM output to an external log file

 - improve ReaR output readability
 - redirect TSM output to external logfile
@schabrolles schabrolles added the enhancement Adaptions and new features label May 7, 2018
@schabrolles schabrolles added this to the ReaR v2.4 milestone May 7, 2018
@schabrolles schabrolles self-assigned this May 7, 2018
@schabrolles schabrolles requested a review from jsmeix May 7, 2018 12:47
# 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.

Copy link
Member

@jsmeix jsmeix left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Perhaps use a backup restore log file name
of the form ...-restore.log so that ist is same
as for a ReaR NETFS backup restore.

@jsmeix
Copy link
Member

jsmeix commented May 8, 2018

Right now I noticed that the backup restore log file is not copied
into the recreated system into /var/log/rear/recover/
cf. usr/share/rear/wrapup/default/990_copy_logfile.sh
which copies all in $VAR_DIR/layout/ and $VAR_DIR/recovery/
but things in $TMP_DIR are intentionally not copied.

Perhaps it is better when in general a backup restore log file
is in $VAR_DIR/recovery/ (and not in $TMP_DIR) to get
the backup restore log file automatically copied into the
recreated system?

@jsmeix
Copy link
Member

jsmeix commented May 8, 2018

Now I noticed that a backup restore log file
is in $VAR_DIR/recovery/ would not be copied
for the 'restoreonly' workflow so that I need to think
a bit more carefully how to get the backup restore log file
properly copied into the recreated system...

@schabrolles
Copy link
Member Author

@jsmeix,
I also think about that (copy the restore log file in the recreated system) and arrives at the same conclusion => not as easy.... If you have a good idea, please tell me.

@jsmeix
Copy link
Member

jsmeix commented May 8, 2018

@schabrolles
just merge this one with TSM-restore.log (instead of TSM_restore.log)
and later - as time permits - I will do a separated pull request to also
get backup restore log files properly copied into the recreated system.

@schabrolles schabrolles merged commit eaf67da into rear:master May 8, 2018
@schabrolles schabrolles deleted the Silent_TSM_Restore branch May 8, 2018 09:21
@jsmeix
Copy link
Member

jsmeix commented May 8, 2018

FYI:
We have
usr/share/rear/restore/RSYNC/default/800_copy_restore_log.sh
but it copies to the old place /root (I will clean it up).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adaptions and new features fixed / solved / done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants