use proxmox_sys::fs::{create_path, CreateOptions};
use crate::rrd::{CF, DST, RRA, RRD};
+use crate::Entry;
mod journal;
use journal::*;
/// * cf=average,r=7*86400,n=570 => 10years
/// * cf=maximum,r=7*86400,n=570 => 10year
///
- /// The resultion data file size is about 80KB.
+ /// The resulting data file size is about 80KB.
pub fn create_proxmox_backup_default_rrd(dst: DST) -> RRD {
let rra_list = vec![
// 1 min * 1440 => 1 day
/// Extract data from cached RRD
///
- /// `start`: Start time. If not sepecified, we simply extract 10 data points.
+ /// `start`: Start time. If not specified, we simply extract 10 data points.
///
/// `end`: End time. Default is to use the current time.
pub fn extract_cached_data(
resolution: u64,
start: Option<u64>,
end: Option<u64>,
- ) -> Result<Option<(u64, u64, Vec<Option<f64>>)>, Error> {
+ ) -> Result<Option<Entry>, Error> {
self.rrd_map
.read()
.unwrap()
for rel_path in files.iter() {
let mut path = config.basedir.clone();
- path.push(&rel_path);
+ path.push(rel_path);
fsync_file_or_dir(&path)
.map_err(|err| format_err!("fsync rrd file {} failed - {}", rel_path, err))?;
}