prefect transfer
command enables you to migrate resources between different Prefect environments, whether moving from development to production, from self-hosted to cloud, or between cloud workspaces.
The command accepts a --from
and --to
profile, and transfers all resources from the source to the destination.
The transfer command is available in Prefect 3.4.14 and later.
Quick start
Transfer all resources from a development environment to production:- Discover all resources in the source profile
- Transfer resources to the destination profile
- Report success, failures, and skipped resources
What gets transferred
The transfer command moves the following resources:- Flows and deployments
- Work pools and work queues
- Blocks and their associated schemas/types
- Variables
- Concurrency limits
- Automations
Common transfer scenarios
Development to production
Transfer resources between different environments:Self-hosted to cloud migration
Move from a self-hosted Prefect server to Prefect Cloud:When transferring to Prefect Cloud Hobby tier workspaces, certain resource types may be skipped due to tier limitations.
Workspace consolidation
Resources can be transferred between multiple workspaces. Resources that already exist in the destination will be skipped.Resource handling
Work pools
The transfer command handles different work pool types according to the destination:- Hybrid pools (process, docker, kubernetes): Transfer to any destination (except Prefect Cloud Hobby tier workspaces)
- Push pools: Transfer only to Prefect Cloud destinations (except Prefect Cloud Hobby tier workspaces)
- Managed pools: Never transferred
Existing resources
Resources that already exist in the destination are skipped you can run it multiple times safely.Resource limits
When transferring to Prefect Cloud workspaces, certain resources may be skipped based on tier limitations. The transfer command will provide clear messages explaining why resources were skipped.Limitations
Resources not transferred
Certain resources are not transferred between environments:- Flow run history and logs
- Result artifacts and cached data
- Cloud-specific infrastructure resources
- Credentials and secrets (must be recreated in the destination)
Environment-specific configuration
Some resources may require manual configuration after transfer to work correctly in the new environment, particularly those that reference external systems or credentials.Best practices
Pre-transfer checklist
-
Verify profiles: Ensure both source and destination profiles are correctly configured
-
Test connectivity: Confirm you can connect to both environments
-
Check tier limitations: Understand destination workspace capabilities
- Hobby tier: Managed pools only, 5 deployment limit
- Standard/Pro tier: Full resource support
Post-transfer validation
After transferring resources:-
Verify critical resources:
-
Test a deployment:
-
Check automation status:
Troubleshooting
Common issues
Resources skipped as “already exists”- This is expected when resources already exist in the destination
- The transfer can be run multiple times safely
- Some resource types require specific Prefect Cloud tiers
- Check your workspace tier and capabilities
- Verify both profiles are correctly configured
- Check network connectivity and authentication
Debug mode
For detailed transfer information, enable debug logging:See also
- Settings and profiles for configuring source and destination profiles
- Work pools for understanding pool types
- Prefect Cloud pricing for workspace capabilities