Skip to content
Snippets Groups Projects

update restic plugin: verify; detect existing repo

Merged Hahn Axel (hahn) requested to merge update-localdump-to-classlike-functions into master
5 files
+ 81
31
Compare changes
  • Side-by-side
  • Inline

Files

+ 13
2
@@ -287,7 +287,9 @@
# --------------------------------------------------------------------------------
# init repository
# param integer exitcode of command
function t_rcCheckInit(){
echo -n "__REPO__ "
case $1 in
0) color ok; echo "OK - the repository was created." ;;
*) color error; echo "Verify output above - returncode of init was $1" ;;
@@ -295,24 +297,31 @@
color reset
}
# backup files
# param integer exitcode of command
# param string directory that was backed up
function t_rcCheckBackup(){
echo -n "__BACKUP__ "
case $1 in
0) color ok; echo "OK" ;;
0) color ok; echo "OK $1" ;;
23) color error
echo "FAILED - DIR ${2}"
echo A lock file was found. Maybe this server was rebooted while performing a backup.
echo If so delete the file lockfile.lock named in the output and start $0 again.
;;
31) color error
echo "FAILED - DIR ${2}"
echo Maybe you it is a problem with the gpg-agent.conf
ls -l ~/.gnupg/gpg-agent.conf && cat ~/.gnupg/gpg-agent.conf
;;
*) color error; echo "Backup error - returncode was $1" ;;
*) color error; echo "FAILED - DIR ${2} - Backup error - returncode was $1" ;;
esac
color reset
}
# repoitory cleanup
# param integer exitcode of command
function t_rcCheckCleanup(){
echo -n "__PRUNE__ "
case $1 in
0) color ok; echo "OK" ;;
*) color error; echo "Cleanup error - returncode was $1" ;;
@@ -321,7 +330,9 @@
}
# restore files
# param integer exitcode of command
function t_rcCheckRestore(){
echo -n "__RESTORE__ "
case $1 in
0) color ok; echo "OK" ;;
*) color error; echo "Restore error - returncode was $1" ;;
Loading