From e5230a6d0c131d83745aae74d974d3cdb3d206f2 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Thu, 7 Apr 2022 12:43:33 +0200
Subject: [PATCH] check archive file, not only seq file

---
 plugins/localdump/couchdb2.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/localdump/couchdb2.sh b/plugins/localdump/couchdb2.sh
index bd6f70e..1691339 100755
--- a/plugins/localdump/couchdb2.sh
+++ b/plugins/localdump/couchdb2.sh
@@ -17,6 +17,7 @@
 #                          delete DB before create request
 # 2022-01-20         v1.3  fixes with shellcheck
 # 2022-03-17         v1.4  WIP: add lines with prefix __DB__
+# 2022-04-07         v1.5  check archive file, not only seq file
 # ================================================================================
 
 if [ -z "$BACKUP_TARGETDIR" ]; then
@@ -195,7 +196,7 @@ function _doBackupOfSingleInstance(){
     # echo
     # echo "update_seq --+-- current [${sSequenceCurrent}]" 
     # echo "             +-- backup  [${sSequenceLast}]"
-    if [ "${sSequenceCurrent}" = "${sSequenceLast}" ]; then
+    if [ "${sSequenceCurrent}" = "${sSequenceLast}" ] && [ -f "$ARCHIVFILE" ]; then
       echo SKIP: still on sequence "${sSequenceLast}"
     else
       echo
-- 
GitLab