Defragmentation during multiphase deduplication. In one example embodiment, a method of defragmentation during multiphase deduplication includes an analysis phase that includes analyzing each allocated block stored in a source storage at a point in time to determine if the block is duplicated in a vault storage, a defragmentation phase that includes reordering the duplicate blocks stored in the source storage to match the order of the duplicate blocks as stored in the vault storage, and a backup phase that is performed after completion of the defragmentation phase and that includes storing, in the vault storage, each unique nonduplicate block from the source storage.