The developer’s backup checklist: what to save before wiping or reinstalling your machine

Wiping a machine or moving to a new one is when developers lose things they didn’t know they needed until three weeks later. SSH keys, half-finished branches, that one .env file that was never in version control — none of it announces itself until it’s gone. Here’s the checklist to run through first.

Credentials and keys

  • SSH keys: back up ~/.ssh/ entirely (private keys, config, known_hosts), not just the public key. You cannot regenerate a private key you’ve lost.
  • GPG keys: if you sign commits, export both public and private keys with gpg --export-secret-keys before wiping.
  • Cloud provider credentials: AWS/GCP/Azure CLI config directories (~/.aws/, ~/.config/gcloud/) often hold access keys not stored anywhere else.
  • Password manager export: confirm your vault syncs to the cloud, not just locally, before wiping the only device holding it.

Project-local secrets

  • .env files: by design these are gitignored, which means a git backup won’t save them. Copy every project’s .env (and .env.local, .env.production) manually.
  • API keys hardcoded during testing: search your shell history and scratch scripts for keys you pasted in a hurry and never rotated.
  • Local database dumps used for development that aren’t reproducible from a seed script.

Git state that isn’t actually saved

  • Unpushed commits and branches. Run git status and git branch -a across every repo — a branch that only exists locally disappears with the disk.
  • Stashes. git stash list is easy to forget; stashed work is not pushed anywhere by default.
  • Uncommitted work-in-progress. Commit it, even to a throwaway branch, before wiping — don’t rely on remembering to “just copy the folder.”
# quick audit across all repos in a directory
for d in ~/projects/*/; do
  echo "== $d =="
  git -C "$d" status --porcelain=v1 2>/dev/null | head -5
  git -C "$d" stash list 2>/dev/null
done

Dotfiles and shell configuration

  • .bashrc/.zshrc, .gitconfig, editor settings (VS Code settings.json, Vim/Neovim config).
  • If these aren’t already in a dotfiles repo, this is the moment to finally put them in one — see how to learn Git without hating it if version control still feels like a chore rather than a safety net.

The 10-minute pre-wipe checklist

  1. Copy ~/.ssh/, ~/.gnupg/, and cloud CLI config directories to external storage.
  2. Run git status and git stash list in every active project; commit or push anything uncommitted.
  3. Manually copy every .env* file across all projects.
  4. Export your password manager vault and confirm cloud sync is current.
  5. Copy dotfiles, or confirm they’re already tracked in a dotfiles repo.
  6. Export browser bookmarks and any locally-saved license keys for paid software.

Quick FAQ

Is copying my whole home folder enough?

It captures most of this, but hidden config directories and gitignored files are easy to miss inside a huge folder copy — go through the checklist explicitly rather than trusting a blind copy.

Should SSH keys be regenerated instead of migrated?

Migrating is fine for personal use, but if a key is shared with any service you don’t fully trust the history of, regenerating it during a machine switch is a good opportunity for hygiene.

What’s the single most commonly forgotten item?

.env files. They’re gitignored on purpose, which means no backup system captures them automatically unless you copy them by hand.

Leave a Reply

Your email address will not be published. Required fields are marked *