From c314f284a2b129eed8e324f0284548e9d19fb1b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 31 Oct 2009 10:18:23 +0100 Subject: [PATCH] export destination_* for usage in post_exec in documentate it Signed-off-by: Nico Schottelius --- ccollect.sh | 6 +++--- doc/ccollect.text | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 6959fa0..651cd8c 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -496,9 +496,9 @@ while [ "${i}" -lt "${no_sources}" ]; do fi # set time when we really begin to backup, not when we began to remove above - destination_name="${INTERVAL}.$(${CDATE}).$$" - destination_dir="${ddir}/${destination_name}" - destination_full="${destination}/${destination_name}" + export destination_name="${INTERVAL}.$(${CDATE}).$$" + export destination_dir="${ddir}/${destination_name}" + export destination_full="${destination}/${destination_name}" # give some info _techo "Beginning to backup, this may take some time..." diff --git a/doc/ccollect.text b/doc/ccollect.text index 3bfef96..38a93fb 100644 --- a/doc/ccollect.text +++ b/doc/ccollect.text @@ -599,6 +599,12 @@ respectively after doing the backup for *this specific* source. If you want to have pre-/post-exec before and after *all* backups, see above for general configuration. +The `post_exec` script can access the following exported variables from +ccollect: + +- destination_name: contains the base directory name (`daily.20091031-1013.24496`) +- destination_dir: full path (`/tmp/ccollect/daily.20091031-1013.24496`) +- destination_full: like 'destination_dir', but prepended with the remote_host, if set (`host:/tmp/ccollect/daily.20091031-1013.24496` or `/tmp/ccollect/daily.20091031-1013.24496`) Example: --------------------------------------------------------------------------------