meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
linux:backup:duply [2018/04/17 08:05] niziaklinux:backup:duply [2018/07/30 08:36] niziak
Line 85: Line 85:
  
 <file bash> <file bash>
-duply gitlab backup && banner OK || banner error +#!/bin/bash -ue 
-duply gitlab purge --force && banner OK || banner error # list outdated backup archives and delete them +set -o pipefail 
-duply gitlab-to-grinnux purgeIncr --force && banner OK || banner error +trap "banner error; echo LINE: $LINENO" ERR 
-duply gitlab-to-grinnux purgeFull --force && banner OK || banner error + 
-duply gitlab cleanup --extra-clean --force > /dev/null && banner OK || banner error # list broken backup files and delete them+duply gitlab backup 
 +duply gitlab purge --force # list outdated backup archives and delete them 
 +duply gitlab-to-grinnux purgeIncr --force 
 +duply gitlab-to-grinnux purgeFull --force 
 +duply gitlab cleanup --extra-clean --force > /dev/null # list broken backup files and delete them 
 +banner ALL OK
 </file> </file>
  
 ===== shell function ===== ===== shell function =====
 <code bash> <code bash>
-function run_duply() { +#!/bin/bash -ueE 
-    duply ${1} backup && banner OK || banner error+set -o pipefail 
 +trap "banner error; echo LINE: $LINENO" ERR 
 + 
 +run_duply() { 
 +    echo "=====================================================" 
 +    duply ${1} backup
     echo "====================================================="     echo "====================================================="
-    duply ${1} purge --force && banner OK || banner error +    duply ${1} purge --force 
-    duply ${1} purgeIncr --force && banner OK || banner error +    duply ${1} purgeIncr --force 
-    duply ${1} purgeFull --force && banner OK || banner error+    duply ${1} purgeFull --force
     echo "====================================================="     echo "====================================================="
-    duply ${1} cleanup --extra-clean --force > /dev/null && banner OK || banner error+    duply ${1} cleanup --extra-clean --force > /dev/null 
 +    echo "====================================================="     
 +    banner ${1} OK
 } }
 </code> </code>