From 4eab6b38b22bb2368efd348e4e4e9c92d7411de4 Mon Sep 17 00:00:00 2001 From: Vasili Sviridov Date: Mon, 26 Dec 2022 14:11:39 -0800 Subject: [PATCH] Remove `icon_cache` from the backup Problem ======= * Icon cache just takes up space in the resulting backup Solution ======== * Remove it from the backup --- README.md | 2 +- backup-bitwarden.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26fe7db..9ed2c54 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,4 @@ * Run `aws configure` * Symlink unit files to `/etc/systemd/system` * Run `systemctl enable` on units and slices -* Run `systemctl start` on timers +* Run `systemctl start` on timers diff --git a/backup-bitwarden.sh b/backup-bitwarden.sh index 7a0bc23..ea2994c 100755 --- a/backup-bitwarden.sh +++ b/backup-bitwarden.sh @@ -43,7 +43,9 @@ cp -r "${ROOT_DIR}/data" "./data" cp "${ROOT_DIR}/.env" "./.env" cp "${ROOT_DIR}/bitwarden.exceede.com.conf" "./bitwarden.exceede.com.conf" -sum=$(find . -type f -not -name "${dumpfile}" -and -not -path "./data/icon_cache/*" -exec md5sum {} + | LC_ALL=C sort | md5sum | cut -d ' ' -f 1) +rm -rf ./data/icon_cache + +sum=$(find . -type f -not -name "${dumpfile}" -exec md5sum {} + | LC_ALL=C sort | md5sum | cut -d ' ' -f 1) rm sorted.sql