This document is to help CE/TA’s migrate existing customers to cloud. The migration is executed by the IE team (#ask-implementation).

Once the commercials are squared away, the migration can begin. The Cloud will create/monitor the instance. However, most everything else will be owned by the IE team including:

  • If we will be performing a data migration
  • If we are working with a large enterprise/strategic customer that has complex needs
  • If the customer generally would benefit from additional help with configuration (especially if they will be building out Precise as part of the migration)

Steps for Migrating from Self-Hosted to Cloud

  1. The CE/TA makes a copy of this doc and works with the customer to fill it out

  2. The CE/TA asks the customer if data migration is required. In most cases, it’s not! All repos can be re-indexed and the instance can be reconfigured with insights, saved searches and etc. However, this saved searches, contexts, notebooks, etc. from the self-hosted instance will not be available unless a data migration is performed.

    • Some data like active-inflight batch changes and usage history will be lost forever and can’t be recreated.
    • This list is not fully comprehensive there might be other parts of the product which can’t be re-configured manually.
  3. If a data migration is required, contact the IE team to own. As the src snapshot utility tool will be used to perform the migration, customers must qualify for a data migration. To qualify, they must:

    • have a Sourcegraph instance on v3.20.0 or later (in most circumstances, IE will recommend upgrading the self-hosted instance to the most recent version of Sourcegraph before migrating
    • use databases on Postgres 12 or later
    • not have on-disk database encryption enabled
    • have the latest release of src
    • have direct database access
    • have a site-admin access token for their instance

    See On-prem data migration to Cloud v2: Requirements for more details.

  4. Request a cloud instance as per our handbook page (CE/TA owned)

  5. Perform the data migration and/or instance configuration (IE owned)

  6. Cloud/Sourcegraph enablement - work with customer to provide cloud or Sourcegraph enablement and training as required, to make sure all the users are onboarded (CE/TA owned). See On-prem data migration to Cloud v2: Process for more details.

Different strategies for cloud migration

  • Cold switch over: This is the simplest migration stratergy (if no data migration is required), we can provision the cloud instance and the customer can redirect users to access the new deployment. Customer can do an internal redirect via proxy config from their self-hosted/on-prem Sourcegraph URL to
  • Running both instances in parallel: The idea here is to run both self-hosted/on-prem and Cloud instance simultaneously. This approach works best, if no data migration is required. Sourcegraph can provision a cloud instance for the customer, which can be configured and tested before retiring the onprem Sourcegraph deployment. – This stratergy can be combined with onboarding users in phases with enablement, as opposed to just turning off the old onprem instance (akin to cold switch over)
  • Managed switched over: This stratergy is preferred when data migration is required. IE will own the migration, and the CE/TA will need to have more of a hands on approach to manage the entire migration process. This involves working with customer on a go-live plan and milestones; getting a data dump, provisioning infra, co-ordinating cutoff process for switch over, communication internal/external stakeholnders and co-ordinating resources.