]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Added TheBigThings::restore
authorCheng-Ling Lai <jamesljlster@gmail.com>
Tue, 9 Dec 2025 07:44:49 +0000 (15:44 +0800)
committerCheng-Ling Lai <jamesljlster@gmail.com>
Tue, 9 Dec 2025 07:44:49 +0000 (15:44 +0800)
client/snbk/TheBigThing.cc
client/snbk/TheBigThing.h

index fa7b7bb086bd8f6fc586818c059f5b74a39bea8e..2587efac8be55515032729f5c5f13a44616c3f24 100644 (file)
@@ -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)
     {
index 577afddc2f8501b4271c91c227e626b4674c654d..0aa24ddec502f061cac977eea4bd50e695e66e60 100644 (file)
@@ -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);