manta_server/backend_dispatcher/
migrate_backup.rs

1//! [`MigrateBackupTrait`] impl for [`StaticBackendDispatcher`].
2//!
3//! Forwards to the backend's "dump live state to disk" helper —
4//! pulls a BOS session template and the IMS image / CFS configuration
5//! it references, writing them under `destination` in a layout that
6//! [`crate::backend_dispatcher::migrate_restore`] can read back.
7//! Ochami uses the trait default and returns [`Error::Message`].
8
9use super::*;
10
11impl MigrateBackupTrait for StaticBackendDispatcher {
12  /// Dump the state derived from BOS session template `bos` (when
13  /// `Some`, otherwise every visible template) into `destination`.
14  /// `destination = None` resolves to the backend's default output
15  /// directory.
16  async fn migrate_backup(
17    &self,
18    token: &str,
19    bos: Option<&str>,
20    destination: Option<&str>,
21  ) -> Result<(), Error> {
22    dispatch!(self, migrate_backup, token, bos, destination)
23  }
24}