Last active
December 29, 2023 09:53
-
-
Save feklee/9e2932734fd96d5782c161c713c05e0b to your computer and use it in GitHub Desktop.
Creates a backup of linux.f76.eu
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 | |
# Creates a backup of my machine: linux.f76.eu | |
# Felix E. Klee <felix.klee@inka.de> | |
LANG="en_US" # Sets locale to US english | |
BACKUP_DIR=~/"Dropbox/Temp Backup/Internet/linux.f76.eu/" | |
BACKUP_FILE="backup.tar.gpg" | |
echo "Making backup to" | |
echo " $BACKUP_FILE" | |
echo "..." | |
sudo tar c \ | |
--one-file-system \ | |
--exclude=/var/cache --exclude=/var/tmp --exclude=/var/lock \ | |
--exclude=/var/run/home --exclude=/home/felix/src \ | |
--exclude=/home/felix/.dropbox-dist --exclude=/home/felix/.dropbox \ | |
--exclude=/home/felix/.cache \ | |
/etc /root /srv /var /home | \ | |
gpg -e -r felix.klee@inka.de >"$BACKUP_DIR/$BACKUP_FILE" | |
echo "Done." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment