[rear-users] Monitoring the restore
Johannes Meixner
jsmeix at suse.de
Tue Dec 18 10:43:29 CET 2018
Hello,
On Dec 17 12:21 Stephen Berg (Code 7309) wrote:
> I've gotten a good backup, make a usable boot USB
A side note FYI:
Be careful when the ReaR recovery system was booted
from a normal disk device like a USB disk, cf.
https://github.com/rear/rear/issues/1854
> I used rsync for the back up and recover so I'm curious
> where could I find a log or output from the rsync process
I am not a rsync user but I think the matching script is
usr/share/rear/restore/NETFS/default/400_restore_backup.sh
e.g. see the latest one at our ReaR upstream GitHub project
https://raw.githubusercontent.com/rear/rear/master/usr/share/rear/restore/NETFS/default/400_restore_backup.sh
Here you can see that there is curently no code that
provides useful feedback from the rsync process (excerpts):
------------------------------------------------------------
# While the backup restore runs in a sub-process,
# display some progress information to the user.
...
case "$BACKUP_PROG" in
(tar)
...
;;
(*)
# Display some rather meaningless info to shows
# at least that restoring is still going on:
...
esac
------------------------------------------------------------
Only in case of 'tar' there is meaningful info.
In all other cases (in particular for 'rsync')
there is only some rather meaningless info.
But above that in the same script there is (excerpts
and too long lines shown wrapped here):
------------------------------------------------------------
local backup_restore_log_dir="$VAR_DIR/restore"
...
backup_restore_log_file=$backup_restore_log_dir/
$backup_restore_log_prefix.$restore_input_basename.
$MASTER_PID.$backup_restore_log_suffix
...
# Launch a subshell that runs the backup restore program.
...
( case "$BACKUP_PROG" in
(tar)
...
;;
(rsync)
...
;;
(*)
...
$BACKUP_PROG $v ...
;;
esac 1>>$backup_restore_log_file 2>&1
) &
BackupPID=$!
Log "Launched backup restore subshell (PID=$BackupPID)"
------------------------------------------------------------
so that 'rsync -v' is run in a subshell with its stdout
and stderr redirected to 'backup_restore_log_file'.
Perhaps you can monitor that 'backup_restore_log_file'?
In general for such cases you may have a look at the section
"How to contribute to Relax-and-Recover" in
https://en.opensuse.org/SDB:Disaster_Recovery
We would appreciate a GitHub pull request with an enhacement
that provides useful feedback also from the 'rsync' process.
Kind Regards
Johannes Meixner
--
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)
More information about the rear-users
mailing list