file: Option<File>,
- pub log_to_stdout: bool,
+ log_to_stdout: bool,
current_archive: Option<(Uuid, u64)>,
}
}
+ /// Enable/Disable logging to stdout (disabled by default)
+ pub fn log_to_stdout(&mut self, enable: bool) {
+ self.log_to_stdout = enable;
+ }
+
fn create_basedir(base_path: &Path) -> Result<(), Error> {
let backup_user = crate::backup::backup_user()?;
let mode = nix::sys::stat::Mode::from_bits_truncate(0o0640);
}
/// Creates a temporary, empty catalog database
+ ///
+ /// Creates a new catalog file using a ".tmp" file extension.
pub fn create_temporary_database(
base_path: &Path,
media_id: &MediaId,
}
/// Commit or Abort a temporary catalog database
+ ///
+ /// With commit set, we rename the ".tmp" file extension to
+ /// ".log". When commit is false, we remove the ".tmp" file.
pub fn finish_temporary_database(
base_path: &Path,
uuid: &Uuid,