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