aboutsummaryrefslogtreecommitdiff
path: root/opt/bin
diff options
context:
space:
mode:
Diffstat (limited to 'opt/bin')
-rwxr-xr-xopt/bin/backup.sh9
-rwxr-xr-xopt/bin/gc.sh10
2 files changed, 19 insertions, 0 deletions
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