|
60 | 60 | { |
61 | 61 | 'name' => 'append_to_file', |
62 | 62 | 'mutilate' => \&mutilate_append_to_file, |
63 | | - 'fails_like' => qr/has size \d+ (on disk|in "[^"]+") but size \d+ in the manifest/ |
| 63 | + 'fails_like' => |
| 64 | + qr/has size \d+ (on disk|in "[^"]+") but size \d+ in the manifest/ |
64 | 65 | }, |
65 | 66 | { |
66 | 67 | 'name' => 'truncate_file', |
67 | 68 | 'mutilate' => \&mutilate_truncate_file, |
68 | | - 'fails_like' => qr/has size 0 (on disk|in "[^"]+") but size \d+ in the manifest/ |
| 69 | + 'fails_like' => |
| 70 | + qr/has size 0 (on disk|in "[^"]+") but size \d+ in the manifest/ |
69 | 71 | }, |
70 | 72 | { |
71 | 73 | 'name' => 'replace_file', |
|
147 | 149 | # same problem, unless the scenario needs UNIX permissions or we don't |
148 | 150 | # have a TAR program available. Note that this destructively modifies |
149 | 151 | # the backup directory. |
150 | | - if (! $scenario->{'needs_unix_permissions'} || |
151 | | - !defined $tar || $tar eq '') |
| 152 | + if ( !$scenario->{'needs_unix_permissions'} |
| 153 | + || !defined $tar |
| 154 | + || $tar eq '') |
152 | 155 | { |
153 | 156 | my $tar_backup_path = $primary->backup_dir . '/tar_' . $name; |
154 | 157 | mkdir($tar_backup_path) || die "mkdir $tar_backup_path: $!"; |
155 | 158 |
|
156 | 159 | # tar and then remove each tablespace. We remove the original files |
157 | 160 | # so that they don't also end up in base.tar. |
158 | 161 | my @tsoid = grep { $_ ne '.' && $_ ne '..' } |
159 | | - slurp_dir("$backup_path/pg_tblspc"); |
| 162 | + slurp_dir("$backup_path/pg_tblspc"); |
160 | 163 | my $cwd = getcwd; |
161 | 164 | for my $tsoid (@tsoid) |
162 | 165 | { |
163 | 166 | my $tspath = $backup_path . '/pg_tblspc/' . $tsoid; |
164 | 167 |
|
165 | 168 | chdir($tspath) || die "chdir: $!"; |
166 | | - command_ok([ $tar, '-cf', "$tar_backup_path/$tsoid.tar", '.' ]); |
| 169 | + command_ok( |
| 170 | + [ $tar, '-cf', "$tar_backup_path/$tsoid.tar", '.' ]); |
167 | 171 | chdir($cwd) || die "chdir: $!"; |
168 | 172 | rmtree($tspath); |
169 | 173 | } |
|
175 | 179 | rmtree($backup_path . '/pg_wal'); |
176 | 180 |
|
177 | 181 | # move the backup manifest |
178 | | - move($backup_path . '/backup_manifest', |
179 | | - $tar_backup_path . '/backup_manifest') |
180 | | - or die "could not copy manifest to $tar_backup_path"; |
| 182 | + move( |
| 183 | + $backup_path . '/backup_manifest', |
| 184 | + $tar_backup_path . '/backup_manifest' |
| 185 | + ) or die "could not copy manifest to $tar_backup_path"; |
181 | 186 |
|
182 | 187 | # Construct base.tar with what's left. |
183 | 188 | chdir($backup_path) || die "chdir: $!"; |
|
0 commit comments