Prerequisites
A rule that uploads writes files to a bucket, so a connected bucket is required for it. Connect one before creating a release with rules that upload: A retention-only rule — one with noupload block — does not upload anything, so it needs no bucket.
The generic prerequisites are covered in the Create a release guide.
Define the file rules
File rules are defined as YAML files in your Git repository. Below is an example rule that uploads the.log files directly inside the /var/log/robot directory (not its
subdirectories) to the my-uploads-bucket bucket, and then deletes each local copy a
week after its upload is confirmed.
robot-logs.yaml
upload and retention are optional and independent. A rule with only retention uploads nothing and simply reclaims disk on the device:
scratch-cleanup.yaml
Bundle related files
For rules that upload files, you can bundle related files together under one logical unit. Bundles are identified by a file rule’s captures and are only shared within a given device: uploads from different devices are never bundled together. To illustrate bundling, consider the following rule which specifies the{recording} capture in source.glob and uses it in upload.bundle to bundle together all files from a single recording.
run_42 folder are bundled together:
data
recordings
run_42
camera.mcap
metadata.yaml
run_43
camera.mcap
metadata.yaml
run_43, land in a different bundle.
File rules with the upload.bundle field require CLI v0.12.2 or later.
Add file rules to a release
To include file rules in a release, use the--file-rule or --file-rules flags when running the miru release create command.

