]>
git.proxmox.com Git - proxmox-backup.git/blob - src/lib.rs
5d2b45907837aeda01fdf15dd974f982845e7c3d
1 //! See the different modules for documentation on their usage.
3 //! The [backup](backup/index.html) module contains some detailed information
4 //! on the inner workings of the backup server regarding data storage.
6 use std
::path
::PathBuf
;
8 use proxmox
::tools
::fs
::CreateOptions
;
10 use pbs_buildcfg
::configdir
;
11 use pbs_tools
::cert
::CertInfo
;
12 use proxmox_rrd
::RRDCache
;
35 pub mod client_helpers
;
37 /// Get the server's certificate info (from `proxy.pem`).
38 pub fn cert_info() -> Result
<CertInfo
, anyhow
::Error
> {
39 CertInfo
::from_path(PathBuf
::from(configdir
!("/proxy.pem")))
42 lazy_static
::lazy_static
!{
43 /// Proxmox Backup Server RRD cache instance
44 pub static ref RRD_CACHE
: RRDCache
= {
45 let backup_user
= pbs_config
::backup_user().unwrap();
46 let file_options
= CreateOptions
::new()
47 .owner(backup_user
.uid
)
48 .group(backup_user
.gid
);
50 let dir_options
= CreateOptions
::new()
51 .owner(backup_user
.uid
)
52 .group(backup_user
.gid
);
54 let apply_interval
= 30.0*60.0; // 30 minutes
57 "/var/lib/proxmox-backup/rrdb",