From 096c1caea9abd76d39256c6751d0e80760ec2bb8 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 25 Feb 2021 14:17:40 -0300 Subject: WIP: Add opt/bin/ --- opt/bin/backup.sh | 9 +++++++++ opt/bin/gc.sh | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100755 opt/bin/backup.sh create mode 100755 opt/bin/gc.sh diff --git a/opt/bin/backup.sh b/opt/bin/backup.sh new file mode 100755 index 0000000..36b5dfc --- /dev/null +++ b/opt/bin/backup.sh @@ -0,0 +1,9 @@ +#!/bin/sh +set -eu + +# FIXME +# borg init if doesn't exist + +borg create -svpC lzma "16686@ch-s010.rsync.net:borg/$(hostname)::{hostname}-{now}-job" + +# FIXME: send email diff --git a/opt/bin/gc.sh b/opt/bin/gc.sh new file mode 100755 index 0000000..55440a7 --- /dev/null +++ b/opt/bin/gc.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -eu + +# FIXME +# Is this correct? +nix-store --gc +nix-collect-garbage -d +guix gc -d + +# FIXME: send email -- cgit v1.2.3