docs/v3/how-to-guides/migrate/transfer-resources.mdx
The 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.
Transfer all resources from a development environment to production:
prefect transfer --from local --to cloud
The command will:
The transfer command moves the following resources:
Resources are transferred in the correct order to preserve relationships between them.
Transfer resources between different environments:
prefect transfer --from dev-profile --to prod-profile
Move from a self-hosted Prefect server to Prefect Cloud:
prefect transfer --from self-hosted-profile --to cloud-profile
Resources can be transferred between multiple workspaces. Resources that already exist in the destination will be skipped.
The transfer command handles different work pool types according to the destination:
Resources that already exist in the destination are skipped you can run it multiple times safely.
# First run
prefect transfer --from dev --to prod
# Output: 25 succeeded, 0 skipped
# Second run (idempotent)
prefect transfer --from dev --to prod
# Output: 0 succeeded, 25 skipped
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.
Certain resources are not transferred between environments:
Some resources may require manual configuration after transfer to work correctly in the new environment, particularly those that reference external systems or credentials.
Verify profiles: Ensure both source and destination profiles are correctly configured
prefect profile inspect source-profile
prefect profile inspect dest-profile
Test connectivity: Confirm you can connect to both environments
prefect --profile source-profile config view
prefect --profile dest-profile config view
Check tier limitations: Understand destination workspace capabilities
After transferring resources:
Verify critical resources:
prefect --profile dest-profile work-pool ls
prefect --profile dest-profile deployment ls
Test a deployment:
prefect --profile dest-profile deployment run my-deployment/my-flow
Check automation status:
prefect --profile dest-profile automation ls
Resources skipped as "already exists"
Resources skipped due to tier limitations
Connection errors
For detailed transfer information, enable debug logging:
PREFECT_LOGGING_LEVEL=DEBUG prefect transfer --from source --to dest