datastore: add single-level and recursive namespace iterators
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
1 parent
02ec2ae9b8
commit
90e3869690
3 files changed
+222
-6
No files matched your search
@@ -12,12 +12,16 @@ fn run() -> Result<(), Error> {
|
||||
|
||||
let store = unsafe { DataStore::open_path("", &base, None)? };
|
||||
|
||||
for group in store.iter_backup_groups(Default::default())? {
|
||||
let group = group?;
|
||||
println!("found group {}", group);
|
||||
for ns in store.recursive_iter_backup_ns_ok(Default::default())? {
|
||||
println!("found namespace store:/{}", ns);
|
||||
|
||||
for snapshot in group.iter_snapshots()? {
|
||||
println!("\t{}", snapshot?);
|
||||
for group in store.iter_backup_groups(ns)? {
|
||||
let group = group?;
|
||||
println!(" found group {}", group);
|
||||
|
||||
for snapshot in group.iter_snapshots()? {
|
||||
println!("\t{}", snapshot?);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user