- 21 Feb 2023
- 2 Minutes to read
-
Print
-
DarkLight
-
PDF
Migrating a ProGet Feed across instances
- Updated on 21 Feb 2023
- 2 Minutes to read
-
Print
-
DarkLight
-
PDF
It may be necessary to migrate all the packages you have stored in a ProGet feed from one instance to another. Depending on the feed type, there are several ways to do this, and this document describes the different approaches.
Preferred Method: Migrate Using Feed Replication
All types of feed are supported.
This is the preferred method for migration because it is easy to configure and works for all feed types.
- Configure a one-way synchronization relationship from the old instance to the new instance
- Wait for replication to complete
- Delete sync relationship
- Disable the old feed
Note that this method requires a ProGet Enterprise license and that either the source instance must be accessible to the target instance or the target instance must be accessible to the source over the network. If you do not have ProGet Enterprise or your instances are isolated, you must use an alternative method.
Alternative Method (simple): Use Feed Import/Download
This is a relatively new feature to ProGet; see Importing/Downloading Feeds to learn more.
Alternative Method (simple): Migrate Using Drop Path
Supports all feed types except Maven and Docker.
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.
- Locate the package storage path from the source feed by visiting the Admin > Manage Feed page
- Copy all packages from the storage path to a directory (see this PowerShell script for an example)
- Configure the bulk import drop path of the target feed to point to the directory from step 2
- Wait for all of the packages to be imported
- Disable bulk import drop path for target feed
- Disable the old feed
Alternative Method (complicated): Direct Database and File System Import/Export
Supported feed types: Maven
This method is complicated and can technically be done with the right SQL scripts for each feed type, but we only provide example scripts for migrating Maven feeds in this way, as Maven feeds don't currently support drop path imports.
- Determine the feed ID of the source feed by visiting the Admin > Manage Feed page and looking at the ?feedId= part of the URL in the browser
- Locate the package storage path from the source feed by visiting the Admin > Manage Feed page
- Connect to the source instance's database using SSMS (for SQL Server) or pgAdmin (for PostgreSQL)
- Execute the export script against your ProGet database, substituting the feed ID determined in step 1: SQL Server | PostgreSQL
- Save the XML output from step 3 into a file, and copy the file to the server hosting the target's database
- Create a new feed of the same type in the target instance
- Locate the package storage path of the target feed by visiting the Admin > Manage Feed page
- Copy all contents recursively from the path determined in step 2 to the path determined in step 7
- Connect to the target instance's database using SSMS and execute the import script, substituting the target feed ID and input the XML file name
- Disable the old feed