Transfer a Project Between Sites
Use the flyw transfer command in the New CLI (flyw) to copy a project from one Flywheel site to another. The source site exports the project, and the destination site imports the files directly from the source site. No files pass through your computer, and no interim storage is needed.
A transfer copies the project's container hierarchy, files, and metadata, including the project's info and tags. For the data that a transfer does not copy, see Migrating Project Data between Flywheel Sites.
Before you begin
- Each site must be configured as a trusted peer of the other, and the two sites must be able to reach each other over the network. Contact Flywheel Support to configure this before your first transfer.
- Install the New CLI (
flyw) and sign in to both sites, each with its own login profile. Sign in with a user API key for each site; transfers do not run with a device API key. - Create the destination group on the destination site. The transfer creates the destination project if it does not exist, but it does not create groups.
- The source and destination must be different sites. To copy data within one site, use Smart Copy instead.
Start a transfer
-
Sign in to each site with its own profile. For example, use the profile
site-afor the source site andsite-bfor the destination site: -
Run
flyw transferwith the source site's profile, and name the destination site's profile with-d:By default, the project keeps its group and label on the destination site. To use a different destination project, add
--destination-project: -
Follow the progress. The command shows live progress for the export on the source site and the import on the destination site. When both finish, it summarizes the files that were transferred, skipped, and failed.
The transfer runs on the two Flywheel sites, not on your computer. If you press Ctrl+C or close the terminal, the transfer keeps running, and the command prints the commands to follow it, for example flyw --profile site-a export get <export-id> --wait. To start a transfer without following its progress in your terminal, add --no-wait. The command then prints the IDs of the export and the import, and returns. --no-wait changes only what your terminal shows; the transfer itself runs the same way.
Choose which files to transfer
By default, a transfer copies the files on every container level. Use these options to limit it:
| Option | Description |
|---|---|
--level | The container level to transfer files from: project, subject, session, or acquisition. Repeat the option for more than one level. |
-i, --include | Transfer only files that match a filter, for example -i file.type=dicom. Repeat the option for more than one filter. |
-e, --exclude | Skip files that match a filter, for example -e 'file.name=~\.txt$'. Repeat the option for more than one filter. |
Filters use the same fields and operators as Bulk Export filters. A filter applies to every level where its field is available. To apply a filter to one level only, prefix it with the level, for example -i acquisition:file.type=dicom.
The project's info and tags are copied only when the transfer includes the project level.
Handle files that already exist
If you transfer into a project that already contains data, use --conflict-strategy to choose what happens to files that already exist in the destination:
| Value | Result |
|---|---|
skip (default) | The transferred file is ignored, and the existing file is left unchanged. |
update | The transferred file is imported, and a file that replaces an existing file is recorded as a new version of it. |
force_update | Like update, and every transferred file is written as a new version, even when nothing about the file has changed. |
Unlike Bulk Import, a transfer does not offer the review strategy. For more about conflicts, see Conflict Strategies.
Troubleshooting
Not configured as a trusted peer
The transfer does not start, and the command reports that a site is not configured as a trusted peer on the other site. Contact Flywheel Support to configure the sites as trusted peers.
Destination group does not exist
The transfer does not start, and the command reports that the destination group does not exist. Create the group on the destination site, or choose an existing group with --destination-project.
The transfer failed
When the export or the import fails, the command prints the reason and the command to download its report, for example flyw --profile site-b import get <import-id> --report=csv. The report lists each file and the reason it failed. See Troubleshooting Bulk Import.
Related pages
- Migrating Project Data between Flywheel Sites — compare the ways to move a project between sites.
flyw transfercommand reference — every option of the command.- Bulk Export and Bulk Import — the features a transfer is built on.