Skip to content

Instantly share code, notes, and snippets.

@feklee
Last active December 29, 2023 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feklee/9e2932734fd96d5782c161c713c05e0b to your computer and use it in GitHub Desktop.
Save feklee/9e2932734fd96d5782c161c713c05e0b to your computer and use it in GitHub Desktop.
Creates a backup of linux.f76.eu
#!/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