Initial commit

This commit is contained in:
2023-03-14 15:08:53 +01:00
commit f9d54f9498
4 changed files with 466 additions and 0 deletions

20
RunTivoliBackup.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
set -ou pipefail
LASTRUN="/var/lib/runtime/$(basename "$0" .sh).lastrun"
if [[ $(pgrep -c "$(basename "$0" .sh)" ) -gt 1 ]]; then
echo "Script already running. Abort!" >&2
exit 1
fi
/usr/bin/dsmc inc >> /var/log/tivoli/tsm.log 2>&1
DSMCRETURN=$?
if [[ "$DSMCRETURN" -ne 0 && "$DSMCRETURN" -ne 8 ]]; then
echo "Error during dsmc execution occurred." >&2
exit 1
fi
date +%s > "$LASTRUN"
exit 0