From 33f022a2ee8bd6006a9693689cd9d819d73239a9 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 23 Dec 2020 09:08:37 +0100 Subject: [PATCH] .bin/daily.sh: refine backup script --- .bin/daily.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bin/daily.sh b/.bin/daily.sh index 54c7e89..4acb165 100755 --- a/.bin/daily.sh +++ b/.bin/daily.sh @@ -7,14 +7,23 @@ set -x pass git push git --git-dir=$HOME/.cfg/ --work-tree=$HOME push +# Fetch a fresh copy of all locally cloned git repos +for dir in $(find /home/kunsi/git -mindepth 1 -maxdepth 1 -type d) +do + git --git-dir=$dir/.git --work-tree=$dir fetch || true +done + # Do a backup. rsync -zaAP --numeric-ids --delete --relative \ --rsync-path="/usr/bin/rsync --fake-super" \ -e "ssh" --delete-excluded \ --exclude "/home/kunsi/.cache/" \ --exclude "/home/kunsi/.config/Rambox/" \ + --exclude "/home/kunsi/.config/Ferdi/" \ --exclude "/home/kunsi/.local/lib/python*/site-packages/" \ --exclude "/home/kunsi/.local/share/sddm/" \ + --exclude "/home/kunsi/.local/share/TelegramDesktop/tdata/user_data/cache/" \ + --exclude "/home/kunsi/.mozilla/firefox/*/storage/*" \ --exclude "/home/kunsi/.npm/" \ --exclude "/home/kunsi/.nvm/" \ --exclude "/home/kunsi/.platformio/" \