miyagi-backup.sh aktualisiert

add scrub stop src und scrub stop local
This commit is contained in:
2025-05-31 19:33:31 +02:00
parent f775f7ed4b
commit b0e336279b
+17 -5
View File
@@ -121,11 +121,22 @@ run_maintenance() {
fi
}
run_scrub_stop() {
run_scrub_stop_src() {
ssh root@"$SOURCEHOST" 'for pool in $(zpool list -H -o name); do
echo "Stoppe Scrub auf Pool: $pool"
zpool scrub -s "$pool"
done'
echo "⏹️ Stoppe Scrub auf Pool: $pool"
zpool scrub -s "$pool"
done'
}
run_scrub_stop_local() {
for pool in $(zpool list -H -o name); do
echo "⏹️ Stoppe Scrub auf Pool: $pool"
if zpool scrub -s "$pool"; then
echo "✔️ Scrub auf $pool gestoppt"
else
echo "❌ Fehler beim Stoppen des Scrubs auf $pool"
fi
done
}
shutdown_if_requested() {
@@ -147,7 +158,8 @@ main() {
run_zsync
run_updates
run_maintenance
run_scrub_stop
run_scrub_stop_local
run_scrub_stop_src
run_pbs_backup
run_remote_updates
shutdown_if_requested