Commit Diff


commit - c57be6e1df69dcec98fd8e16badfcd037e026d41
commit + dfb814201937caf2bd86abad83b77f6fb1dadec1
blob - /dev/null
blob + 314d2b315d0f0338883b6bfd88ec54c11d2462db (mode 755)
--- /dev/null
+++ bin/mbackup
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+usage="usage: mbackup host"
+
+if test "$#" -ne 1
+then
+	echo $usage
+	exit 1
+fi
+
+host=$1
+repository="sftp:$host:/home/vmail"
+
+restic --password-file /mail/lib/backup_password \
+	-r "$repository" backup /mail/box
+
+restic --password-file /mail/lib/backup_password \
+	-r "$repository" forget \
+	--keep-hourly 24 --keep-daily 7 --prune