From 1925479e76259ceb15c3d6ffd8c56ea0fbf16ee7 Mon Sep 17 00:00:00 2001 From: Felix Delattre Date: Sat, 4 Mar 2023 12:43:36 +0000 Subject: [PATCH] Add .zshrc.aliases Add backup.sh --- dot_zshrc.aliases | 1 + executable_backup.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 dot_zshrc.aliases create mode 100644 executable_backup.sh diff --git a/dot_zshrc.aliases b/dot_zshrc.aliases new file mode 100644 index 0000000..afcf517 --- /dev/null +++ b/dot_zshrc.aliases @@ -0,0 +1 @@ +alias v=""~/.local/bin/lvim"" diff --git a/executable_backup.sh b/executable_backup.sh new file mode 100644 index 0000000..8cf5df9 --- /dev/null +++ b/executable_backup.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# default number of backups that are kept, per path per host. +# will be overwritten by -k +export KEEPLAST=7 + +# location of backup repository, hostname may be defined +# in .ssh/config +# at this location an initialized repository must exist +# (this can be done with `restic init`) +export RESTIC_REPOSITORY="sftp:user@anthe:/mnt/external/private/personal" +export RESTIC_EXCLUDE="/home/user/Pictures" + +# Password that is supplied to `restic init` +export RESTIC_PASSWORD=$(sudo cat /etc/backup/personal.pass) + +exec restic "$@" --exclude=${RESTIC_EXCLUDE} --exclude="/home/user/.cache" --exclude="/home/user/.config/VSCodium/Cache/" --exclude="/home/user/.config/VSCodium/CachedData/" --exclude="/home/user/.config/VSCodium/CachedExtensions/" --exclude="/home/user/.config/VSCodium/CachedExtensionVSIXs/" + +unset RESTIC_REPOSITORY +unset RESTIC_PASSWORD