From 2758ac4bfbc976c921d64ad4efb79fcd80b9d528 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sun, 6 Apr 2025 21:05:08 +0200 Subject: [PATCH] pbackup: Use volume with most space for full backups --- bin/pbackup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/pbackup b/bin/pbackup index 2069e6f..f5d9e23 100755 --- a/bin/pbackup +++ b/bin/pbackup @@ -560,7 +560,11 @@ ORDER BY due next if $nosys and $job_name =~ /^sys_/; next unless lck_can_lock("SERVER.$path_server", LCK_EX); next unless lck_can_lock("JOB.$job_name", LCK_EX); - $datadir = datadir($job_name); # $ROOT/data/X1234 + if ($type eq 'I') { + $datadir = datadir($job_name); # $ROOT/data/X1234 + } else { + $datadir = free_datadir(); + } -d $datadir or next; my $free = df_cached($datadir) / 1024 / 1024 / 1024; if ($free < 2) {