Skip to content
Snippets Groups Projects

show last backup, prune, verify

Merged Hahn Axel (hahn) requested to merge 5823-grep-regex-with-spaces into master
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
+ 6
2
@@ -14,6 +14,8 @@
# 2022-03-21 v1.7 <axel.hahn@iml.unibe.ch> show databases infos for couchdb2 too
# 2022-03-23 v1.8 <axel.hahn@iml.unibe.ch> FIX: exit with error if backup error occured
# 2022-08-10 v1.9 <axel.hahn@iml.unibe.ch> FIX: mask the dot in .log
# 2022-10-21 v1.10 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# show last backup, prune, verify
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
@@ -52,14 +54,16 @@ echo
# that do not have a line "__DB__[type] backup"
for dbtype in $( echo "$result" | grep -o '__DB__[a-z][a-z0-9]*' | sort -u )
do
echo "$result" | grep "$dbtype\ backup" >/dev/null \
echo "$result" | grep "$dbtype backup" >/dev/null \
&& echo --- local dumps "${dbtype//__DB__/}" \
&& echo "$result" | grep "$dbtype" | grep -v "\.log" \
&& echo
done
echo "--- transfer:"
echo "$result" | grep "__[A-Z][A-Z]*__\ "
echo "$result" | grep "__[A-Z][A-Z]*__ "
echo
echo "$result" | grep "__LAST__"
ph.exit
Loading