Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Extract all versions of a file/folder from Time Machine backup
# 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