Created
January 15, 2018 05:30
-
-
Save karlding/f9e61556cbd128108053a3f08dc767a9 to your computer and use it in GitHub Desktop.
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/bash | |
# Backup all my music from my Windows Music folder | |
# (/media/karl/5A14316614314673/Users/Karl/Music) to my 2 TB external drive | |
# (/media/karl/A0D83FDAD83FAE02/bak/Users/Karl/Music) using rsync | |
WINDOWS_MEDIA_DIR="/media/karl/5A14316614314673/Users/Karl/Music" | |
EXTERNAL_DRIVE="/media/karl/A0D83FDAD83FAE02/bak/Users/Karl" | |
rsync -va "${WINDOWS_MEDIA_DIR}" "${EXTERNAL_DRIVE}" | |
# Delete files that have been removed from my Music directory from the external | |
# First run with --dry-run and check the output, then remove the flag to | |
# actually delete | |
# rsync -va --dry-run --delete "${WINDOWS_MEDIA_DIR}" "${EXTERNAL_DRIVE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment