diff --git a/Cargo.lock b/Cargo.lock index 986a94fd2..5887fe5ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2916,7 +2916,7 @@ dependencies = [ [[package]] name = "rustic_backend" version = "0.1.1" -source = "git+https://github.com/rustic-rs/rustic_core.git#dcc7e3434fd16bfcf0df6faf343101397316f858" +source = "git+https://github.com/rustic-rs/rustic_core.git?branch=drop-index#6e46514ab7612cab44514f33e254f0300af3d18e" dependencies = [ "aho-corasick", "anyhow", @@ -2948,7 +2948,7 @@ dependencies = [ [[package]] name = "rustic_core" version = "0.2.0" -source = "git+https://github.com/rustic-rs/rustic_core.git#dcc7e3434fd16bfcf0df6faf343101397316f858" +source = "git+https://github.com/rustic-rs/rustic_core.git?branch=drop-index#6e46514ab7612cab44514f33e254f0300af3d18e" dependencies = [ "aes256ctr_poly1305aes", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index a5dfe243c..ed5b5e497 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,8 +40,8 @@ rustdoc-args = ["--document-private-items", "--generate-link-to-definition"] [dependencies] abscissa_core = { version = "0.7.0", default-features = false, features = ["application"] } -rustic_backend = { git = "https://github.com/rustic-rs/rustic_core.git", features = ["cli"] } -rustic_core = { git = "https://github.com/rustic-rs/rustic_core.git", features = ["cli"] } +rustic_backend = { git = "https://github.com/rustic-rs/rustic_core.git", branch = "drop-index", features = ["cli"] } +rustic_core = { git = "https://github.com/rustic-rs/rustic_core.git", branch = "drop-index", features = ["cli"] } # allocators jemallocator-global = { version = "0.3.2", optional = true } diff --git a/src/commands/restore.rs b/src/commands/restore.rs index 56959d914..3daeec236 100644 --- a/src/commands/restore.rs +++ b/src/commands/restore.rs @@ -64,7 +64,7 @@ impl RestoreCmd { let dest = LocalDestination::new(&self.dest, true, !node.is_dir())?; - let restore_infos = repo.prepare_restore(&self.opts, ls.clone(), &dest, dry_run)?; + let restore_infos = repo.prepare_restore(&self.opts, ls, &dest, dry_run)?; let fs = restore_infos.stats.files; println!( @@ -94,6 +94,10 @@ impl RestoreCmd { if dry_run { repo.warm_up(restore_infos.to_packs().into_iter())?; } else { + // save some memory + let repo = repo.drop_data_from_index(); + + let ls = repo.ls(&node, &ls_opts)?; repo.restore(restore_infos, &self.opts, ls, &dest)?; println!("restore done."); }