From 72034cb0420fce291b9cc95fc1baba1050b8f9ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 26 Mar 2010 09:36:22 +0100 Subject: [PATCH] add hints on pre_exec error handling Signed-off-by: Nico Schottelius --- contrib/{patrick => ccollect_mgr}/README | 0 contrib/{patrick => ccollect_mgr}/S60ccollect_example | 0 contrib/{patrick => ccollect_mgr}/ccollect_mgr.sh | 0 contrib/{patrick => ccollect_mgr}/rdu | 0 doc/ccollect.text | 8 +++++++- 5 files changed, 7 insertions(+), 1 deletion(-) rename contrib/{patrick => ccollect_mgr}/README (100%) rename contrib/{patrick => ccollect_mgr}/S60ccollect_example (100%) rename contrib/{patrick => ccollect_mgr}/ccollect_mgr.sh (100%) rename contrib/{patrick => ccollect_mgr}/rdu (100%) diff --git a/contrib/patrick/README b/contrib/ccollect_mgr/README similarity index 100% rename from contrib/patrick/README rename to contrib/ccollect_mgr/README diff --git a/contrib/patrick/S60ccollect_example b/contrib/ccollect_mgr/S60ccollect_example similarity index 100% rename from contrib/patrick/S60ccollect_example rename to contrib/ccollect_mgr/S60ccollect_example diff --git a/contrib/patrick/ccollect_mgr.sh b/contrib/ccollect_mgr/ccollect_mgr.sh similarity index 100% rename from contrib/patrick/ccollect_mgr.sh rename to contrib/ccollect_mgr/ccollect_mgr.sh diff --git a/contrib/patrick/rdu b/contrib/ccollect_mgr/rdu similarity index 100% rename from contrib/patrick/rdu rename to contrib/ccollect_mgr/rdu diff --git a/doc/ccollect.text b/doc/ccollect.text index a751abf..56e575b 100644 --- a/doc/ccollect.text +++ b/doc/ccollect.text @@ -335,11 +335,14 @@ If you add '$CCOLLECT_CONF/defaults/`pre_exec`' or will start `pre_exec` before the whole backup process and `post_exec` after backup of all sources is done. +If `pre_exec` exits with a non-zero return code, the whole backup +process will be aborted. + The `pre_exec` and `post_exec` script can access the following exported variables: - 'INTERVAL': the interval selected (`daily`) - 'no_sources': number of sources to backup (`2`) -- 'source_$no': name of the source, '$no' starts at 0 +- 'source_$no': name of the source, '$no' starts at 0 (`$source_0`) The following example describes how to report free disk space in human readable format before and after the whole backup process: @@ -605,6 +608,9 @@ 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. +If `pre_exec` exits with a non-zero return code, the backup +process of `this source` will be aborted (i.e. backup skipped). + The `post_exec` script can access the following exported variables from ccollect: