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
#!/usr/bin/env bash | |
# Script to backup the home directory to an external hardrive mounted at /media/backup | |
# Uses rsync, dpkg, and mail (for error logging) | |
SRC='/home/wolfgang' | |
DEST='/home/wolfgang/Nextcloud/backups' | |
RSYNC_OPTS='-haAXuv --delete' | |
EXCLUDE='*/Trash/* */.cache/* */.thumbnails/* */.config/google-* lost+found .gvfs .putty/ Downloads/ Dropbox/ Nextcloud/ VirtualBoxVMs/' | |
EXCLUDE="$(echo $EXCLUDE | sed 's/\(\S\+\)/ --exclude \1/g')" |