Last active
August 21, 2020 09:42
-
-
Save gingerbeardman/f099e3136e359ae075479ed2b10199ef to your computer and use it in GitHub Desktop.
Extract all versions of a file/folder from Time Machine backup
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
# adapted from https://apple.stackexchange.com/questions/230154/getting-all-versions-of-a-file-from-a-time-machine-backup/230392#230392 | |
TARGET="/Volumes/External/Users/matt/Projects/TMextract/all_my_versions" | |
# create new folder | |
mkdir $TARGET | |
# change directory to your backups | |
cd /Volumes/Tardis/Backups.backupdb/matt | |
pwd | |
# run for loop to copy all folders into newly created directory | |
for F in * | |
do | |
echo $F | |
rsync --exclude={'_Old','*.zip'} -avz --no-perms --no-group --no-owner "$F/External/Users/matt/Projects/Alpha" $TARGET/$F | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment