Replies: 2 comments
-
Fortunately, I am able to build the backup MWE by reading trough /bin/conserve.rs, tests/api/backup.rs, and the documentation use std::path::Path;
use conserve::archive::Archive;
use conserve::backup::{backup, BackupOptions};
use conserve::live_tree::LiveTree;
fn main() {
let archive = Path::new("/home/user/playground/backup/storage/");
// must be a directory
let source = "/home/user/playground/backup/source/";
// create archive
// Archive::create_path(archive).unwrap();
// backup
backup(
&Archive::open_path(&archive).unwrap(),
&LiveTree::open(source).unwrap(),
&BackupOptions::default(),
)
.expect("backup");
println!("Hello, world!");
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @azzamsa great to hear that you're interested. For now the existing code, as you found, is the best guide, but we can certainly talk about how to make it easier to use. What were you thinking to build on top of it? Bear in mind the GPL v2 license imposes some requirements on programs that include Conserve. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I plan to use conserve as library. Is there any starting point for me?
Something like trust-dns client where it explains the minimal working example and docs for using it as a library (not as CLI).
Thanks for conserve.
Beta Was this translation helpful? Give feedback.
All reactions