@@ -546,8 +546,11 @@ sub append_conf
546
546
=item $node->backup(backup_name)
547
547
548
548
Create a hot backup with B<pg_basebackup > in subdirectory B<backup_name > of
549
- B<< $node->backup_dir >> , including the WAL. WAL files
550
- fetched at the end of the backup, not streamed.
549
+ B<< $node->backup_dir >> , including the WAL.
550
+
551
+ By default, WAL files are fetched at the end of the backup, not streamed.
552
+ You can adjust that and other things by passing an array of additional
553
+ B<pg_basebackup > command line options in the keyword parameter backup_options.
551
554
552
555
You'll have to configure a suitable B<max_wal_senders > on the
553
556
target server since it isn't done by default.
@@ -556,15 +559,16 @@ target server since it isn't done by default.
556
559
557
560
sub backup
558
561
{
559
- my ($self , $backup_name ) = @_ ;
562
+ my ($self , $backup_name , %params ) = @_ ;
560
563
my $backup_path = $self -> backup_dir . ' /' . $backup_name ;
561
564
my $name = $self -> name;
562
565
563
566
print " # Taking pg_basebackup $backup_name from node \" $name \"\n " ;
564
567
TestLib::system_or_bail(
565
568
' pg_basebackup' , ' -D' , $backup_path , ' -h' ,
566
569
$self -> host, ' -p' , $self -> port, ' --checkpoint' ,
567
- ' fast' , ' --no-sync' );
570
+ ' fast' , ' --no-sync' ,
571
+ @{ $params {backup_options } });
568
572
print " # Backup finished\n " ;
569
573
return ;
570
574
}
0 commit comments