-
-
Notifications
You must be signed in to change notification settings - Fork 268
Notification feature rhbz #1377547 #1022
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
Conversation
Signed-off-by: Petr Hracek <[email protected]>
You are not authorized to access bug #1377547. To see this bug, you must first log in to an account with the appropriate permissions. |
|
Relax-and-Recover is free software. |
|
Here is the text: Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: Actual results: Expected results: Additional info: I have not completely tested above but looks possible to get notification from here. |
|
Hello, not sure if I've understood all aspects of your problem, but wouldn't be enough to modify command like: |
|
@phracek And, rear does write a message in: after each run (as you see). Your proposal only writes a message in the rear log itself. |
|
In its current form I cannot accept it, see If the customer request is actually valid in general If the customer request is actually valid in general FINAL_REPORT_VARIABLES=( WORKFLOW BACKUP_URL ) and in /usr/sbin/rear at the end something like if test $FINAL_REPORT_VARIABLES ; then
LogPrint "Final report:"
for v in ${FINAL_REPORT_VARIABLES[@]} ; do
LogPrint "$v : ${!v}"
done
fi
But currently I am wondering if the customer request is actually valid FYI why it means basically nothing |
|
Please reference #991 for my initial issue, that will help explain a lot of what I am trying to do here. What I am proposing, instead of hijacking the umount command like I have in the past (which worked great up to and including rear v1.15) is to add a new variable we can define in local.conf or site.conf that gets executed at the very end of the backup, so that I can use internal rear variables such as: "$NETFS_URL/${NETFS_PREFIX}/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}" In my case, I am interested in a string with the timestamp and the above final location of the backup tar so that I can insert them into a database. Let me know if any of that needs more explaining. Thank you. |
|
@gigawatts A side note: It is always possible to add another level of indirection. which - from my personal experience - is one of the main It is always possible to aglutenate multiple separate problems into a single complex interdependent solution. which I call "Keep Separated Items Separated" ('KSIS'). Back to the actual topic: In general regarding a "variable we can define in local.conf POST_BACKUP_SCRIPT= I tested on my SLES12-SP2 system OUTPUT=ISO BACKUP=NETFS BACKUP_OPTIONS="nfsvers=3,nolock" BACKUP_URL=nfs://10.160.4.244/nfs ... POST_BACKUP_SCRIPT=( 'echo "NETFS_URL: $NETFS_URL" ; echo "NETFS_PREFIX: $NETFS_PREFIX" ; echo "BACKUP_PROG_ARCHIVE: $BACKUP_PROG_ARCHIVE" ; echo "BACKUP_PROG_SUFFIX: $BACKUP_PROG_SUFFIX" ; echo "BACKUP_PROG_COMPRESS_SUFFIX: $BACKUP_PROG_COMPRESS_SUFFIX"' ) I got: # /usr/sbin/rear -d -D mkbackup Relax-and-Recover 1.19 / Git Using log file: /root/rear/var/log/rear/rear-g136.log ... Archived 1221 MiB in 136 seconds [avg 9198 KiB/sec] NETFS_URL: NETFS_PREFIX: g136 BACKUP_PROG_ARCHIVE: backup BACKUP_PROG_SUFFIX: .tar BACKUP_PROG_COMPRESS_SUFFIX: .gz In my case NETFS_URL is not shown because Note that NETFS_URL is outdated according to Replaced NETFS_URL and ISO_URL by BACKUP_URL and OUTPUT_URL. However, old references will still be recognized and used. cf. prep/default/02_translate_url.sh if [[ "$NETFS_URL" ]] ; then
Log "Using NETFS_URL is deprecated. Use BACKUP_URL instead."
BACKUP_URL=$NETFS_URL
fi
When I use BACKUP_URL in my POST_BACKUP_SCRIPT Bottom line: I regard this issue as a "support" question |
|
Yes, I am said customer. Originally I was trying to solve an issue with NETFS_UMOUNTCMD not working as expected (still an open issue), but realized that a better solution to my problem was a post script. It sounds like that new POST_BACKUP_SCRIPT var is exactly what I was looking for! I'll have a look at v1.19 and see if that works for my needs. Thank you. |
|
@gigawatts what prevents your from adding your custom code in a script in FYI, adding scripts to the ReaR structure is the recommended way of extending ReaR with new or custom functionality. |
|
@schlomo I noticed several .../01_... and .../99_... scripts I wonder if we should re-number them so that the The current ReaR 01_ and 99_ scripts: backup/default/01_pre_backup_script.sh backup/default/99_post_backup_script.sh build/default/99_update_os_conf.sh finalize/NBU/default/99_copy_bplogrestorelog.sh finalize/default/01_prepare_checks.sh init/default/01_set_drlm_env.sh layout/prepare/default/01_prepare_files.sh output/default/01_set_umask.sh rescue/GNU/Linux/99_sysreqs.sh rescue/default/01_merge_skeletons.sh restore/default/99_move_away_restored_files.sh setup/default/01_pre_recovery_script.sh wrapup/default/99_copy_logfile.sh |
|
That might be a good idea. Thanks for seeing that. On 24 October 2016 at 10:18, Johannes Meixner [email protected]
|
|
I cannot do a re-numbering with reasonable effort, see |
|
FYI: The re-numbering is done now via Since I merged #1053 This means you must update your working copy |
Signed-off-by: Petr Hracek [email protected]
reference rhbz https://bugzilla.redhat.com/show_bug.cgi?id=1377547