Migrating a ProGet Feed

KB#1168: Last Updated Jun 11, 2019

Migrating a Feed Between ProGet Instances

It may be necessary to migrate all of the packages you have stored in a ProGet feed from one instance to another. There's a few different ways to do this depending on the feed type, and this document will describe the various approaches.

Prefered Method: Migrate using Feed Replication

Supported feed types: NuGet, Chocolatey, PowerShell, npm, Maven, PyPI, VSIX, Helm, Debian, Ruby Gems, Universal

This is the preferred method for migration, since it is easy to configure and works across all feed types.

  1. Configure a one-way sync relationship from the old instance to the new instance
  2. Wait for replication to complete
  3. Delete sync relationship
  4. Disable old feed

Note that this method requires a ProGet Enterprise license and requires either the source instance to be accessible to the target or the target instance to be accessible to the source over the network. If you do not have ProGet Enterprise or your instances are isolated, you will need to use an alternative method.

Alternative Method (simple): Migrate using Drop Path

Supported feed types: NuGet, Chocolatey, PowerShell, npm, PyPI, VSIX, Helm, Debian, Ruby Gems, Universal

This method is simple, but requires packages to be manually copied to the target server, or to a network path accessible from the target server.

  1. Locate package storage path from source feed by visiting the Admin->Manage Feed page
  2. Copy all packages from the storage path to a directory (see this PowerShell script for an example)
  3. Configure the bulk import drop path of the target feed to point to the directory from step 2
  4. Wait for all packages to be imported
  5. Disable bulk import drop path for target feed
  6. Disable old feed

Alternative Method (complicated): Direct Database and File System Import/Export

Supported feed types: Maven

This method is complicated and can technically be performed on any feed type with the right SQL scripts, but we only provide example scripts for migrating Maven feeds in this way, since Maven feeds don't currently support drop path imports.

  1. Determine feed ID of source feed by visiting the Admin->Manage Feed page and looking at the ?feedId= part of the URL in the browser
  2. Locate package storage path from source feed by visiting the Admin->Manage Feed page
  3. Connect to the source instance's database using SSMS (for SQL Server) or pgAdmin (for PostgreSQL)
  4. Execute the export script against your ProGet database, substituting the feed ID determined in step 1: SQL Server | PostgreSQL
  5. Save the XML output from step 3 into a file, and copy the file to the server hosting the target's database
  6. Create a new feed of the same type in the target instance
  7. Locate package storage path of target feed by visiting the Admin->Manage Feed page
  8. Copy all contents recursively from the path determined in step 2 to the path determined in step 7
  9. Connect to the target instance's database using SSMS and execute the import script, subsituting the target feed ID and input XML file name
  10. Disable old feed