feat: i3 update & other minor stuff

This commit is contained in:
Strix 2024-03-07 14:25:45 +01:00
parent 28ca2f79be
commit c9010fe697
No known key found for this signature in database
GPG key ID: 5F35B3B8537287A7
9 changed files with 169 additions and 73 deletions

View file

@ -0,0 +1,8 @@
#!/bin/sh
apply() {
echo "------------ WARNING ------------"
echo "BACKUPS ARE NOT SETUP ON DEBIAN! "
echo " PLEASE SETUP MANUALLY "
echo "---------------------------------"
}

View file

@ -0,0 +1,4 @@
#!/bin/sh
describe="Setup restic backups"
scripts="@distro" # only distro

View file

@ -0,0 +1,41 @@
#!/bin/bash
HOSTNAME=${HOSTNAME:-$(hostname)}
log() {
echo "log: $@"
if [ -f "/var/backups/ntfy.env" ]; then
. /var/backups/ntfy.env
curl \
-s \
-d "$@" \
${NTFY_URL:-https://push.ixvd.net/logs}
fi
}
log starting backup for $HOSTNAME
restic \
-r /var/backups/$HOSTNAME \
-p /var/backups/$HOSTNAME.secret \
backup \
--tag auto \
--exclude-caches \
--exclude dist \
--exclude target \
--exclude node_modules \
--exclude bin \
--exclude .cache \
--exclude '.config/*/cache' \
--exclude '.config/*/Cache' \
--exclude .cargo/git \
--exclude .cargo/registry \
--exclude '.rustup' \
--exclude '.local' \
--exclude '.var' \
--exclude Steam \
--exclude '.config/Code' \
--exclude '.config/Code - OSS' \
--exclude 'code/linux' \
--exclude Downloads \
/srv /home /etc
log backup finished with $?

View file

@ -0,0 +1,10 @@
#!/bin/sh
HOSTNAME=${HOSTNAME:-$(hostname)}
[ -d "/var/backups" ] || mkdir -p /var/backups
[ -f "/var/backups/$HOSTNAME.secret" ] || openssl rand -hex 64 > /var/backups/$HOSTNAME.secret
restic init \
-r /var/backups/$HOSTNAME \
-p /var/backups/$HOSTNAME.secret

View file

@ -0,0 +1,11 @@
#!/bin/bash
# sync backup to *the* external
HOSTNAME=${HOSTNAME:-$(hostname)}
set -e
rsync \
--info=progress2 \
-avzylu \