Created
January 15, 2018 05:30
-
-
Save karlding/f9e61556cbd128108053a3f08dc767a9 to your computer and use it in GitHub Desktop.
Revisions
-
karlding created this gist
Jan 15, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/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}"