We recommend storing your repository data on a separate block device to make backups and future expansions easier. If you have a significant amount of repository data on an external block device, you may find it more efficient to migrate the entire block device to a new installation instead of copying the data between devices.

For more information on adding a block device, see our instructions for VMware or VirtualBox.

  1. If you don't have copies of the latest GitHub Enterprise virtual appliance (OVA file), GitHub Enterprise software package (GHP file), and license (GHL file), download them now.

  2. Enable maintenance mode on your existing GitHub Enterprise installation.

  3. Run ghe-export-mysql on your existing installation to back up MySQL data. This includes user accounts, commit comments, pull requests, and issues.

    ssh admin@old-ghe-hostname -- 'ghe-export-mysql' | gzip > ghe-mysql-backup.sql.gz
    
  4. Run ghe-export-redis to back up Redis data. This includes a variety of cached data counts and other settings required by the application.

    ssh admin@old-ghe-hostname -- 'ghe-export-redis' > ghe-redis-backup.rdb
    
  5. Run ghe-export-pages to back up generated GitHub Pages sites.

    ssh admin@old-ghe-hostname -- 'ghe-export-pages' > ghe-pages-backup.tar
    
  6. Back up or take a snapshot of your block device.

  7. Shut down your existing installation and detach the block device from it.

  8. Import the latest OVA (which you downloaded earlier) on your hypervisor as a new VM.

  9. Attach your block device to the hardware on which the VM is provisioned.

  10. Enterprise welcome screenBoot your new VM.

  11. Initial uploadOpen http://[new-ghe-hostname]/setup in your browser and upload your license and GHP file.

  12. Open http://[new-ghe-hostname]/setup/settings in your browser.

  13. Add new SSH keyWithout saving your settings, upload a public SSH key.

  14. Run ghe-import-mysql to restore MySQL data onto your new GitHub Enterprise installation.

    gzip -dc ghe-mysql-backup.sql.gz | ssh admin@new-ghe-hostname -- 'ghe-import-mysql'
    
  15. Run ghe-import-redis to restore Redis data onto your new GitHub Enterprise installation.

    ssh admin@new-ghe-hostname -- 'ghe-import-redis' < ghe-redis-backup.rdb
    
  16. Run ghe-import-pages to restore generated GitHub Pages sites.

    ssh admin@new-ghe-hostname -- 'ghe-import-pages' < ghe-pages-backup.tar
    
  17. Open http://[new-ghe-hostname]/setup/settings in your browser.

  18. Select block deviceUnder Repository storage, verify that the Block device option appears with the label "recommended." If the option appears with the label "no device detected," you will need to add the new block device (see our instructions for VMware or VirtualBox).

  19. Block device listSelect the Block device option and choose your block device from the dropdown menu that appears.

  20. Configure any other necessary settings.

  21. Saving configurationFinally, click Save settings at the bottom of the page.