From 0c78fbaa4fc2e375fae894800217ace077a9a136 Mon Sep 17 00:00:00 2001 From: Hartmut Bauer Date: Fri, 21 Mar 2025 00:37:01 +0100 Subject: [PATCH] =?UTF-8?q?Backups=20funktionieren=20grunds=C3=A4tzlich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 6 ++++++ backup.sh | 6 ------ test.sh | 40 ++++++++++++++++++++++++++++++---------- 3 files changed, 36 insertions(+), 16 deletions(-) delete mode 100755 backup.sh diff --git a/TODO.md b/TODO.md index 4cb0127..2038a11 100644 --- a/TODO.md +++ b/TODO.md @@ -28,6 +28,12 @@ gpg --batch --decrypt --passphrase 1234567890 -o test.txt test.txt.gpg # ohne - ``` +### ssh + +auf nathan + +je Server ssh -mount-point-/Server/bin/backup/cron.sh -mount-point-/Server/log/backup/-server-/backup.x.log + ### TODO nextcloud: diff --git a/backup.sh b/backup.sh deleted file mode 100755 index ea05a36..0000000 --- a/backup.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# -# entrypoint for all actions -# - -echo "not implemented yet" diff --git a/test.sh b/test.sh index 6a35fb1..ccfeb12 100755 --- a/test.sh +++ b/test.sh @@ -1,16 +1,12 @@ #!/usr/bin/env bash -HOSTNAME=$(hostname) +HOST_NAME=$(hostname) DAY=$(date +%u) +HERE=$(dirname "$0") -RUN_DIR=/var/docker -BACKUP_DIR=vol -SOURCE=nextcloud -TARGET_DIR=/var/docker/tmp PASSPHRASE=1234567890 EXT=tgz.gpg -RESTORE=vol/nextcloud/data/data/nextcloud.log # Log-Datei schreiben. # @@ -275,17 +271,41 @@ hamiller_test() { } test() { - #LOG_FILE=./t1.log - #log INFO "error test" - echo "host: #$1#" + for i in "$@"; do echo "$i"; done } +isFunction() { declare -Ff "$1" ; } + #nas_test #nathan_test #hamiller_test #test1 -list_archives /var/docker/tmp + +list1() { + EXCL=("eaDir" "Temporary Items" "lost+found" backups) + ONE="erster #1" + TWO="zweiter #1" + #for i in "${a[@]}"; do echo "$i"; done +} +list2() { + EXCL=("@eaDir" "Temporary Items" "lost+found") + ONE="eins2" + TWO="zwei2" + + #for i in "${a[@]}"; do echo "$i"; done +} + + +count=1 +isFunction list4 +while [ $(isFunction list$count) ]; do + list$count + for i in "${EXCL[@]}"; do echo "$i"; done + echo "$count: one = ${ONE} / two = ${TWO}" + let "count += 1" +done + exit