chore: back up home directory

This commit is contained in:
Ferit Yiğit BALABAN 2023-05-25 07:39:36 +03:00
parent 30f42331e8
commit 7cdcaf9bb7
Signed by: fyb
GPG Key ID: E21FEB2C244CB7EB

8
backup_home.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Ferit Yiğit BALABAN <f@fybx.dev>, 2022
#
echo "Hello, $( whoami )"
echo "w/o Downloads: $( du -sh --exclude='Downloads' "$HOME" )"
echo "wth Downloads: $( du -sh "$HOME" )"
doas tar --exclude="$HOME/Downloads" --exclude="$HOME/.local/share/JetBrains" --exclude="$HOME/.cache/pip" --exclude="$HOME/.cache/yay" --exclude="$HOME/.cache/JetBrains" --exclude="$HOME/.nuget" --create --verbose --preserve-permissions --gzip --file "/home/ferit-$( date +'%y%m%d' ).tar.gz" /home/ferit