Skip to main content
This page is archived. Fly Postgres (unmanaged) is no longer maintained, and Fly.io Support is not able to provide support or guidance for it. We now offer Fly.io Managed Postgres, our fully-managed database service that handles all aspects of running production PostgreSQL databases.These pages are kept for reference and are not listed in the navigation. The full set is indexed on the Fly Postgres (Unmanaged) page.
A volume fork is a new volume that contains an exact copy of the data from a source volume. For Postgres apps, you use the --fork-from flag to specify a source Postgres app when you create a new Postgres app. The new Postgres app has a new volume that contains a block-level snapshot of the data from the source app’s volume. Use volume forking to create identical staging or test environments, troubleshoot issues, analyze data, or test database performance without impacting your production database. You can also use volume forks for PR review environments. A PR review environment is especially useful when a PR contains database migrations that you don’t want to run against your production database.
Important: After you fork a volume, the new volume is independent of the source volume. The new volume and the source volume do not continue to sync.

Fork a volume into a new Postgres app

To create a new Postgres app with a volume fork, specify the Postgres app to fork using the --fork-from flag on provision:
For example:

Fork a specific volume into a new Postgres app

The --fork-from option creates the new volume in the same region as the source volume, but on a different physical host. Forking directly to a new region isn’t supported yet. To fork a volume into a separate region from your primary volume, you can fork from a replica volume in another region. Choose a specific volume in an existing Postgres app to fork:
For example: