@@ -742,6 +742,46 @@ def test_overwrite_alias_true(
742742 assert literature .collection == "Article" , "alias must point to the original collection"
743743
744744
745+ def test_incremental_backup (client : weaviate .WeaviateClient , request : SubRequest ) -> None :
746+ """Create and restore incremental backup."""
747+ if client ._connection ._weaviate_version .is_lower_than (1 , 37 , 0 ):
748+ pytest .skip ("List backups is only supported from 1.37.0" )
749+
750+ backup_id = unique_backup_id (request .node .name )
751+ base_backup_id = backup_id + "_base"
752+
753+ # create base backup
754+ client .backup .create (
755+ backup_id = base_backup_id ,
756+ backend = BACKEND ,
757+ include_collections = ["Article" ],
758+ wait_for_completion = True ,
759+ )
760+
761+ # create incremental backup
762+ client .backup .create (
763+ backup_id = backup_id ,
764+ backend = BACKEND ,
765+ include_collections = ["Article" ],
766+ wait_for_completion = True ,
767+ incremental_backup_base_id = base_backup_id ,
768+ )
769+
770+ # remove existing class
771+ client .collections .delete ("Article" )
772+
773+ # restore incremental backup
774+ client .backup .restore (
775+ backup_id = backup_id ,
776+ backend = BACKEND ,
777+ include_collections = ["Article" ],
778+ wait_for_completion = True ,
779+ )
780+
781+ # check data exists again
782+ assert len (client .collections .use ("Article" )) == len (ARTICLES_IDS )
783+
784+
745785# This test has been disabled temporarily until the behaviour of this scenario is clarified.
746786# It worked in version 1.33.0-rc.1, but broken in version 1.33.0+
747787# def test_overwrite_alias_false(
0 commit comments