File Versioning
Introduction
With file versioning, Flywheel tracks changes to your data over time to support scientific reproducibility and regulatory compliance. File versioning allows you to restore or delete previous versions of a file in Flywheel.
This article gives an overview of file versioning and how to view, restore or delete previous versions of a file:
Instruction Steps
How Does File Versioning Work?
All files in Flywheel have a version number starting at 1. If a file is modified or overwritten in Flywheel, the previous version is retained, and the latest version, version 2, becomes the active version.
All operations involving files in Flywheel will use the latest file version. For example, the latest file version is used to view, download, or select a file for gear input. Operations via the Flywheel SDK have the option to request a specific version.
Examples of Events That Will Result in a New File Version
- Uploading DICOM data that results in overwriting an existing file. For example, uploading an acquisition that already exists in that project.
- Running a utility or analysis gear that results in the output overwriting the previous run's output. For example, rerunning a DICOM to NIFTI conversion.
Examples of Events That Will not Result in a New File Version
- Changes to file metadata, such as changing modality or classification.
- Uploading DICOM data in Project A to Project B. File versioning is scoped to each project.
Restoring a Previous Version
Restoring a previous file version means the chosen version becomes the latest version and the version number goes up by 1. The latest file version is the default file for actions in Flywheel (such as viewing, downloading, or running a gear against the file).
All of the file's metadata is also restored. You can view a file's metadata by selecting the information icon.
Deleting a Previous Version
Once you delete a version, that file can no longer be accessed. Deleting a previous version helps ensure that other users don't use a bad version of the file.
How to View File Versions
Acquisition Files
- Sign in to Flywheel.
- Navigate to an acquisition file. When a file has more than 1 version, the file version icon appears next to it.
- Hover over the file, and select the options menu icon.
- Choose Version History from the dropdown menu.
-
Previous file versions appear. From here, you can view previous file information, restore a previous version, or delete a previous version.
-
If you restore a file, you will need to verify if you want to rerun gear rules that apply to the file.
Analysis Input and Output Files
When you run an analysis gear, the Gear creates an analysis output. To view versions of the analysis output file:
- Sign in to Flywheel.
- Select a project, and click the Analysis tab.
-
Select an analysis to expand the information.
- The analysis results show the file version used for both the input file and the output file the gear created.
-
Select the option menu , and choose Version History.
- The previous file versions appear. From here you can view previous file metadata, restore a previous version, or delete a previous version
Attachments
- Navigate to an attachment.
- When a file has more than 1 version, the file version icon appears next to it.
- Hover over the file, and select the options menu icon.
- Choose Version History from the dropdown menu.
- Previous versions of the file appear. From here you can view previous file information, restore a previous version, or delete a previous version.