diff --git a/localdump.sh b/localdump.sh
index 2c4f13441a0272f585f5c92927e00306a74461a1..c1a6df5506278ae204ff1b0724507703f799ce7e 100755
--- a/localdump.sh
+++ b/localdump.sh
@@ -18,6 +18,7 @@
 # 2022-11-04  ah     rename hooks
 # 2024-03-14  ah     v2.0: use profiles for local and remote databases
 # 2024-03-18  ah     fix for db detection from file and cli restore
+# 2024-10-02  ah     reset $rc before calling db plugin
 # ======================================================================
 
 # --- variables:
@@ -486,6 +487,8 @@ EOH
                 _j_runHooks "200-before-db-service"
   
                 h3 "BACKUP [${PROFILENAME}] -> ${SERVICENAME}"
+                rcbak=$rc
+                rc=0
                 . $BACKUP_SCRIPT $mode
   
                 test $rc -gt 0 && j_notify "db ${SERVICENAME}" "$BACKUP_SCRIPT $mode was finished with rc=$rc" $rc
@@ -497,6 +500,8 @@ EOH
                 # ----- post jobs: cleanup
                 cleanup_backup_target
                 show_info_backup_target
+
+                rc=$rc+$rcbak
     
             else