From: Cheng-Ling Lai Date: Tue, 9 Dec 2025 07:44:49 +0000 (+0800) Subject: Added TheBigThings::restore X-Git-Tag: v0.13.1~62^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=739a3ec864f6c6680f09b465c677b705e8a83079;p=thirdparty%2Fsnapper.git Added TheBigThings::restore --- diff --git a/client/snbk/TheBigThing.cc b/client/snbk/TheBigThing.cc index fa7b7bb0..2587efac 100644 --- a/client/snbk/TheBigThing.cc +++ b/client/snbk/TheBigThing.cc @@ -562,6 +562,20 @@ namespace snapper } + void + TheBigThings::restore(const BackupConfig& backup_config, bool quiet, bool verbose) + { + for (TheBigThing& the_big_thing : the_big_things) + { + if (the_big_thing.target_state == TheBigThing::TargetState::VALID && + the_big_thing.source_state == TheBigThing::SourceState::MISSING) + { + the_big_thing.restore(backup_config, *this, quiet); + } + } + } + + void TheBigThings::remove(const BackupConfig& backup_config, bool quiet, bool verbose) { diff --git a/client/snbk/TheBigThing.h b/client/snbk/TheBigThing.h index 577afddc..0aa24dde 100644 --- a/client/snbk/TheBigThing.h +++ b/client/snbk/TheBigThing.h @@ -94,6 +94,7 @@ namespace snapper TheBigThings(const BackupConfig& backup_config, ProxySnappers* snappers, bool verbose); void transfer(const BackupConfig& backup_config, bool quiet, bool verbose); + void restore(const BackupConfig& backup_config, bool quiet, bool verbose); void remove(const BackupConfig& backup_config, bool quiet, bool verbose);