Skip to main content

Backing Up Metadata to a Repository

Beyond deployments, mtdt.io can snapshot an org's metadata and push it to a branch as a standalone backup — a complete, source-formatted copy of your configuration, versioned in Git. No deployment required, and no sfdx scripts to maintain.

This gives you a living mirror of an org in version control: full history, diffs, and a baseline for reliable comparisons.

How it works​

  1. Choose the org to snapshot and the connected repository (and branch) to push into.
  2. mtdt.io retrieves the org's metadata and commits it to the branch in source format.
  3. Later, re-push to update the branch with the org's current state — so the Git mirror keeps tracking the org instead of going stale after a one-time dump.

Backup settings with Git backup enabled — each snapshot is mirrored as a commit to a repository branch

What the Git connection needs​

The push needs write access to the repository's contents — for a GitHub App installation, the Contents: write permission on the repository you are pushing into.

mtdt.io checks this before it starts. A read-only credential fails immediately with "The Git account has no write access to the repository. Grant it Contents: write." instead of retrieving the whole org first and failing on the push, and the failure is not retried — retrying cannot fix a permission. Grant the permission (or reinstall the app on that repository) and run the backup again.

Reconnecting the account does not help: the account is connected and lacks write permission. See Setting Up Version Control Connection.

When you'd use this​

  • Onboarding a repo from an existing org — capture the current configuration as your starting baseline.
  • A versioned safety net — keep a Git-tracked copy you can diff, review, and check out any past state from.
  • Capturing out-of-band changes — pick up edits made directly in the org (outside mtdt.io) by re-pushing on a cadence.

Backup to Git vs. Metadata Backup​

These sound alike but solve different problems — most teams want both:

  • Backup to Git (this guide) — metadata as a version-controlled source of truth with history, diffs, and branches.
  • Metadata Backup — scheduled point-in-time snapshots for recovery, independent of your Git workflow.

Think of Git as your working history and Metadata Backup as your insurance policy.

Best practices​

  • Re-push on a cadence so the mirror stays current even for changes made outside mtdt.io.
  • Use a dedicated branch for org snapshots if you want to keep them separate from your development branches.
  • Keep the archive too if you want to deploy from the snapshot — a backup pushed to Git without an archive in storage cannot be used as a deployment or comparison source.