Skip to main content
← All guides

Export your files or roll back a migration

Keep a complete independent copy and verify the destination before removing source data.

Export the required history

With LFSPush still configured as the source and a token that can read the repository, fetch all required Git refs and LFS objects. A Git bundle preserves Git history but does not include LFS file contents; back up both.

git fetch origin --tags
git lfs fetch --all origin
git bundle create repository.bundle --all

Copy to another LFS host

Configure the destination using a local lfs.url override, resolving any explicit push URL overrides. Authenticate with that host's credentials and push all LFS objects. This changes where file data is sent; it does not move the code repository.

git config --local lfs.url YOUR_DESTINATION_LFS_URL
git lfs push --all origin

Roll back a migration

  1. Pause new writes while you reconcile the copies.
  2. Fetch any files written only to the new host and upload them to the original host before switching back.
  3. Restore the original endpoint in local configuration, .lfsconfig, and CI. Resolve any lfs.pushurl or remote-specific overrides.
  4. Use a clean clone to verify the restored endpoint and required historical revisions.
  5. Recreate lock coordination separately and resume writes after the team confirms the rollback.
Open your workspace