From 47d30b3c5b10812010c25ced00e4b418c37f8aa3 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 28 Oct 2023 12:09:57 +0200 Subject: backup implementation, enhancements and fixes --- .local/bin/backup-prune | 6 ++++++ .local/bin/backup-run | 5 +++++ .local/bin/shutdown-run | 6 ++++++ .local/bin/update | 1 + 4 files changed, 18 insertions(+) create mode 100755 .local/bin/backup-prune create mode 100755 .local/bin/backup-run create mode 100755 .local/bin/shutdown-run (limited to '.local') diff --git a/.local/bin/backup-prune b/.local/bin/backup-prune new file mode 100755 index 0000000..78f5402 --- /dev/null +++ b/.local/bin/backup-prune @@ -0,0 +1,6 @@ +#!/bin/zsh + +source $HOME/.config/borg/.env-backup + +borg -v prune --keep-daily=7 --keep-weekly=4 --keep-monthly=12 :: +borg -v compact :: diff --git a/.local/bin/backup-run b/.local/bin/backup-run new file mode 100755 index 0000000..ee2c013 --- /dev/null +++ b/.local/bin/backup-run @@ -0,0 +1,5 @@ +#!/bin/zsh + +source $HOME/.config/borg/.env-backup + +borg -v create ::$(date "+%Y%m%d_%H%M%S") "${BACKUP_PATH}" diff --git a/.local/bin/shutdown-run b/.local/bin/shutdown-run new file mode 100755 index 0000000..4820dbc --- /dev/null +++ b/.local/bin/shutdown-run @@ -0,0 +1,6 @@ +#!/bin/zsh + +update +backup-run +backup-prune +sudo shutdown -h diff --git a/.local/bin/update b/.local/bin/update index ee6f67d..c0c337c 100755 --- a/.local/bin/update +++ b/.local/bin/update @@ -23,5 +23,6 @@ docker_compose_project_paths = set(docker_compose_project_paths) for path in docker_compose_project_paths: subprocess.run(["docker", "compose", "down"], cwd=path) + subprocess.run(["docker", "compose", "build"], cwd=path) subprocess.run(["docker", "compose", "pull"], cwd=path) subprocess.run(["docker", "compose", "up", "-d"], cwd=path) -- cgit v1.2.3