Last active
April 11, 2024 13:01
-
-
Save port19x/8a3160e83d8ebf3b85b84e06aa9ea115 to your computer and use it in GitHub Desktop.
backup script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
a=$(date +%d.%m.%y) | |
du -shc "$HOME/git" "$HOME/doc" "$HOME/dotfiles" "$HOME/pic" "$HOME/.ssh" "$HOME/Passwords.kdbx" | |
printf "Is the backup small enough? (CTRL-C otherwise)" | |
read | |
echo "$a: initiating backup" | |
cd | |
mkdir "$a" | |
cp -r "git" "doc" "dotfiles" "pic" ".ssh" "Passwords.kdbx" "$a" | |
tar c -I"zstd -19 -T0" -f "$a.tar.zst" "$a" | |
gpg -c "$a.tar.zst" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment