From e333839c8b92a9eb7620108b3b881f2d64002c69 Mon Sep 17 00:00:00 2001 From: zaphod-black Date: Sat, 1 Nov 2025 19:58:43 -0500 Subject: [PATCH] Fix: Remove stderr suppression from journalctl to show logs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROBLEM: - User running "sudo journalctl -u pbs-backup-manual.service -f" sees perfect verbose output - But installer script shows blank screen during backup - Progress updates like "processed 65.6 GiB in 18m" should be visible ROOT CAUSE: - journalctl command had "2>/dev/null" which suppressed all stderr - This was hiding any errors or blocking journalctl from displaying properly - The -n 100 flag was unnecessary complexity SOLUTION: - Removed "2>/dev/null" - allow journalctl to show its output normally - Removed "-n 100" flag - not needed with --since - Reduced --since from "5 seconds ago" to "2 seconds ago" for tighter window - Kept "|| true" so Ctrl+C doesn't fail the script Now the backup progress should display exactly like: processed 65.6 GiB in 18m, uploaded 64.4 GiB processed 69.3 GiB in 19m, uploaded 68.0 GiB (updates every minute during block device backup) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- pbs-client-installer.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pbs-client-installer.sh b/pbs-client-installer.sh index 31d54f7..3ea6907 100755 --- a/pbs-client-installer.sh +++ b/pbs-client-installer.sh @@ -1018,8 +1018,7 @@ run_backup_now() { MONITOR_PID=$! # Follow logs in foreground from the start (will be killed by monitor when backup completes) - # Use --since to catch logs from service start, and -n 100 to show recent context - journalctl -u pbs-backup-manual.service -f --since "5 seconds ago" -n 100 2>/dev/null || true + journalctl -u pbs-backup-manual.service -f --since "2 seconds ago" || true # Wait for monitor to finish wait $MONITOR_PID 2>/dev/null @@ -1174,8 +1173,7 @@ main() { MONITOR_PID=$! # Follow logs in foreground from the start (will be killed by monitor when backup completes) - # Use --since to catch logs from service start, and -n 100 to show recent context - journalctl -u pbs-backup-manual.service -f --since "5 seconds ago" -n 100 2>/dev/null || true + journalctl -u pbs-backup-manual.service -f --since "2 seconds ago" || true # Wait for monitor to finish wait $MONITOR_PID 2>/dev/null