Skip to content

Commit 8b7d914

Browse files
Merge branch 'main' into 6.0
2 parents 3e3d87a + 3294ea4 commit 8b7d914

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Get an in depth look into all the features and a short 'getting started' tutoria
1616
[![Code Coverage](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/?branch=master)
1717
[![PHP Website](https://img.shields.io/website-up-down-green-red/https/phpbu.de.svg)](https://phpbu.de)
1818

19-
If you are not using php 7.4 or greater already you can still use phpbu version [6.0.20](https://phar.phpbu.de/phpbu-5.2.10.phar) \
19+
If you are not using php 8.0 or greater already you can still use phpbu version [6.0.20](https://phar.phpbu.de/phpbu-5.2.10.phar) \
2020
If you are not using php 7.2 or greater already you can still use phpbu version [5.2.10](https://phar.phpbu.de/phpbu-5.2.10.phar) \
2121
If you are behind php 7.0 you can still use phpbu version [4.0.10](https://phar.phpbu.de/phpbu-4.0.10.phar)
2222

src/Backup/Rsync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected function setupRsync(array $conf)
110110
$this->passwordFile = Util\Arr::getValue($conf, 'passwordFile', '');
111111
$this->excludes = Util\Str::toList(Util\Arr::getValue($conf, 'exclude', ''), ':');
112112
$this->delete = Util\Str::toBoolean(Util\Arr::getValue($conf, 'delete', ''), false);
113-
$this->isDirSync = Util\Str::toBoolean(Util\Arr::getValue($conf, 'dirsync', ''), false);
113+
$this->isDirSync = Util\Str::toBoolean(Util\Arr::getValue($conf, 'isDirSync', ''), false);
114114
}
115115
}
116116

src/Log/Prometheus.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ public function onPhpbuEnd(End $event)
102102
$this->write('# TYPE phpbu_backup_duration gauge' . PHP_EOL);
103103
foreach ($this->backupStats as $backupName => $backupStats) {
104104
$duration = $this->backupStats[$backupName]['timeEnd'] - $this->backupStats[$backupName]['timeStart'];
105+
if ($duration < 0) {
106+
$duration = 0;
107+
}
105108
$this->write('phpbu_backup_duration{name="' . $backupName . '"} ' . $duration . PHP_EOL);
106109
}
107110

@@ -124,7 +127,7 @@ public function onPhpbuEnd(End $event)
124127
foreach ($this->backupStats as $backupName => $backupStats) {
125128
$this->write(
126129
'phpbu_backup_size{name="' . $backupName . '"} ' .
127-
$this->backupStats[$backupName]['size'] .
130+
($this->backupStats[$backupName]['size'] ?? "0") .
128131
PHP_EOL
129132
);
130133
}

0 commit comments

Comments
 (0)