Mac OS - Recovery#
1. Pre-Crash Backup Checklist (Do This Now)#
Ensure these configurations are regularly backed up or pushed to GitHub to prevent data loss.
- 1.1 Setup Brewfile Versioning: Dump, commit, and push your system package lists.
- Details: Fully implemented. Covered in detail in Mac OS - Brewfile.
- 1.2 Sync Packages & Scripts: Track changes to package lists using
pushbrewand script/alias updates usingpushscripts.- Details: Completed. Use
pushbrewfor package list updates andpushscriptsfor codebase updates. See Mac OS - Brewfile.
- Details: Completed. Use
- 1.3 Automate MCP Config Pushes: Update the
mcpalias to push local configuration commits.- Details: Completed.
mcpalias now auto-commits and pushes local changes to GitHub (MCP-Config-MacOS).
- Details: Completed.
- 1.4 Version-Control Custom Aliases: Migrate custom shortcuts out of local configurations.
- Details: Migrated to
~/Scripts/MacOS/Aliases/MacOS-Aliases.zsh. See Mac OS - Aliases Management.
- Details: Migrated to
- 1.5 Double Check Git Hook Backups: Save a copy of your Git hooks.
- Details: Completed. The mirror hook is backed up at
~/Scripts/MacOS/post-commit-hook.sh.
- Details: Completed. The mirror hook is backed up at
2. Workstation Rebuild Checklist (In Case of Crash)#
Follow these steps in order to restore the Mac Studio environment on a fresh macOS installation.
- 2.1 Install Homebrew
- Run the official installation script:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Run the official installation script:
- 2.2 Clone the Scripts Repository
- Pull down all custom automation, environment setups, and sync scripts:
git clone git@github.com:marcoue/Scripts.git ~/Scripts
- Pull down all custom automation, environment setups, and sync scripts:
- 2.3 Restore Shell Profile and Aliases
- Run the auto-restore script to recreate your local profile structure:
source ~/Scripts/MacOS/Aliases/MacOS_Aliases_restore.sh - Retrieve the 1Password Token and OpenAI API Key from your 1Password
HomelabVault under the entryMac OS .zshrc fileand write them into the placeholders in~/.zshrc. - See Mac OS - Aliases Management for detailed manual secrets configurations.
- Run the auto-restore script to recreate your local profile structure:
- 2.4 Restore Software Stack via
Brewfile- Reinstall all CLI tools, Casks, and VS Code extensions:
brew bundle --file=~/Scripts/MacOS/Brew/Brewfile - See Mac OS - Brewfile for downstream syncing instructions.
- Reinstall all CLI tools, Casks, and VS Code extensions:
- 2.5 Mount NAS Network Shares
- Connect to the central UNAS-Pro share:
mkdir -p /Volumes/Software mount -t smbfs //10.1.2.2/Software /Volumes/Software - Re-create local shortcut symlinks:
mkdir -p ~/SMBShares ln -s /Volumes/Software ~/SMBShares/Software
- Connect to the central UNAS-Pro share:
- 2.6 Restore Obsidian Vault
- Clone the Obsidian Homelab vault:
git clone git@github.com:marcoue/obsidian-homelab.git ~/Obsidian/Homelab
- Clone the Obsidian Homelab vault:
- 2.7 Redeploy Git Post-Commit Hooks
- Set up the automatic mirror hook to sync local scripts to the NAS:
cp ~/Scripts/MacOS/post-commit-hook.sh ~/Scripts/.git/hooks/post-commit chmod +x ~/Scripts/.git/hooks/post-commit
- Set up the automatic mirror hook to sync local scripts to the NAS:
- 2.8 Restore MCP Server Configurations
- Clone the MCP configuration repo:
git clone git@github.com:marcoue/MCP-Config-MacOS.git ~/.mcp-config - Run the configuration applicator:
python3 ~/.mcp-config/apply.py
- Clone the MCP configuration repo:
- 2.9 Enable System-Level Services (Cron & Terminal FDA)
- Go to System Settings > Privacy & Security > Full Disk Access and add
/usr/sbin/cronand Terminal. - Under Files and Folders, ensure
cronhas access to Network Volumes. - Configure the crontab:
Add the active sync routines:
crontab -e# Homelab Sync: Daily at 12:10 PM and 8:10 PM 10 12 * * * bash /Users/marc/Scripts/MacOS/sync-obsidian-homelab-hugo.sh >> /Users/marc/Scripts/MacOS/sync-obsidian-homelab-hugo.log 2>&1 10 20 * * * bash /Users/marc/Scripts/MacOS/sync-obsidian-homelab-hugo.sh >> /Users/marc/Scripts/MacOS/sync-obsidian-homelab-hugo.log 2>&1 # GenDash Sync: Daily at 12:10 PM and 8:10 PM 10 12 * * * bash /Users/marc/Scripts/MacOS/sync-obsidian-gendash-hugo.sh >> /Users/marc/Scripts/MacOS/sync-obsidian-gendash-hugo.log 2>&1 10 20 * * * bash /Users/marc/Scripts/MacOS/sync-obsidian-gendash-hugo.sh >> /Users/marc/Scripts/MacOS/sync-obsidian-gendash-hugo.log 2>&1
- Go to System Settings > Privacy & Security > Full Disk Access and add