# Never lose robot data again: automatic ROS 2 bag recording and upload

DevFeed: [Never lose robot data again: automatic ROS 2 bag recording and upload](<https://devfeed.tech/articles/never-lose-robot-data-again-automatic-ros-2-bag-recording-and-upload-116421.md>)

Original publisher: [Read original article](<https://canonical.com//blog/never-lose-robot-data-again-automatic-ros-2-bag-recording-and-upload>)

Author: gbeuzeboc

Published: 2026-11-03T16:02:04Z

Content type: tutorial

Language: en

Sources: [Canonical](<https://devfeed.tech/sources/canonical.md>)

Topics: [recording](<https://devfeed.tech/topics/recording.md>), [snap](<https://devfeed.tech/topics/snap.md>)

Tags: [automatic](<https://devfeed.tech/tags/automatic.md>), [automatically](<https://devfeed.tech/tags/automatically.md>), [aws](<https://devfeed.tech/tags/aws.md>), [backends](<https://devfeed.tech/tags/backends.md>), [fleet](<https://devfeed.tech/tags/fleet.md>), [recording](<https://devfeed.tech/tags/recording.md>), [robot](<https://devfeed.tech/tags/robot.md>), [ros-2](<https://devfeed.tech/tags/ros-2.md>), [storage](<https://devfeed.tech/tags/storage.md>), [upload](<https://devfeed.tech/tags/upload.md>)

## AI overview

The `ros2-exporter-agent` snap automates ROS 2 bag capture and upload through four services: a recorder writes MCAP bags split by time or size, synchronization attempts uploads every two minutes with rclone and retries when the server is unreachable, daily rotation restarts recording at midnight, and auto-clean removes local files older than 10 minutes. Recording starts only after auto-clean is running, leaving bags as a short local staging buffer. Uploads use an rclone remote named `bagstore`, which can alias an SFTP server or S3-compatible storage; the excerpt says rclone supports more than 40 backends. Robots can be configured with local `rclone.conf` and `rosbag2-recorder.yaml` files, or receive shared configuration through a separate configuration snap for fleet-wide updates. The excerpt also suggests pulling bags with rclone, browsing stored files, or opening remote MCAP URLs in Foxglove.

## Source excerpt

If you work with robots, perhaps you've come up against a common, but annoying situation: the one field run that mattered is the one nobody recorded. Or it was recorded but the ROS 2 bag (a recording of ROS 2 topics) is sitting in the robot's storage, at a customer site, three time zones away. [...]