@@ -615,16 +615,16 @@ def init_pb(self, backup_dir, old_binary=False):
615
615
old_binary = old_binary
616
616
)
617
617
618
- def add_instance (self ,backup_dir ,instance ,node ,old_binary = False ):
618
+ def add_instance (self ,backup_dir ,instance ,node ,old_binary = False , options = [] ):
619
619
620
- return self . run_pb ( [
620
+ cmd = [
621
621
'add-instance' ,
622
622
'--instance={0}' .format (instance ),
623
623
'-B' ,backup_dir ,
624
624
'-D' ,node .data_dir
625
- ],
626
- old_binary = old_binary
627
- )
625
+ ]
626
+
627
+ return self . run_pb ( cmd + options , old_binary = old_binary )
628
628
629
629
def del_instance (self ,backup_dir ,instance ,old_binary = False ):
630
630
@@ -1049,7 +1049,7 @@ def del_test_dir(self, module_name, fname):
1049
1049
except :
1050
1050
pass
1051
1051
1052
- def pgdata_content (self ,pgdata ,ignore_ptrack = True ):
1052
+ def pgdata_content (self ,pgdata ,ignore_ptrack = True , exclude_dirs = None ):
1053
1053
""" return dict with directory content. "
1054
1054
" TAKE IT AFTER CHECKPOINT or BACKUP"""
1055
1055
dirs_to_ignore = [
@@ -1062,6 +1062,9 @@ def pgdata_content(self, pgdata, ignore_ptrack=True):
1062
1062
'backup_label' ,'tablespace_map' ,'recovery.conf' ,
1063
1063
'ptrack_control' ,'ptrack_init' ,'pg_control'
1064
1064
]
1065
+
1066
+ if exclude_dirs :
1067
+ dirs_to_ignore = dirs_to_ignore + exclude_dirs
1065
1068
# suffixes_to_ignore = (
1066
1069
# '_ptrack'
1067
1070
# )