commit 7c4c3ebf35adbefd0bdcdecf25eef4853056f86f parent 212d8f875b4aeab9293bde2f69f0582ec80d8dff Author: Andrew Laack <andrew@laack.co> Date: Wed, 22 Apr 2026 12:25:35 -0500 Updated status bar + restic backups Diffstat:
| M | backups/restic.sh | | | 4 | +++- |
| M | statusbar.sh | | | 8 | +++++--- |
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/backups/restic.sh b/backups/restic.sh @@ -15,6 +15,8 @@ source ~/.bashrc # This is executed by cron -restic -v -r sftp:root@andrew-1.selfhost.imbue.com:/backup/ backup /home/backup $HOME/personal-files | tee -a ~/logs/backup-restic.log 2>&1 +restic -vv -r sftp:root@andrew-1.selfhost.imbue.com:/backup/ backup /home/backup $HOME/personal-files | tee -a ~/logs/backup-restic.log 2>&1 + +echo "$(date)" >> $HOME/logs/backup-restic-times.txt # restic -r sftp:root@andrew-1.selfhost.imbue.com:/backup/ -r restore latest --target /restored diff --git a/statusbar.sh b/statusbar.sh @@ -6,10 +6,12 @@ #xsetroot -name "$(cat ~/logs/backup-status.log) | $(date)" # NEW: -LAST_SUCCESS=$(tail -n 1 ~/logs/backup-times.txt) +LAST_SUCCESS_MAIN=$(tail -n 1 ~/logs/backup-times.txt 2>/dev/null || true) +LAST_SUCCESS_RESTIC=$(tail -n 1 ~/logs/backup-restic-times.txt 2>/dev/null || true) -if [ -n "$LAST_SUCCESS" ]; then - xsetroot -name "Last Backup: $LAST_SUCCESS | $(date)" +if [ -n "$LAST_SUCCESS_MAIN" ] || [ -n "$LAST_SUCCESS_RESTIC" ]; then + STATUS="MAIN: ${LAST_SUCCESS_MAIN:-never} | RESTIC: ${LAST_SUCCESS_RESTIC:-never} | TIME: $(date)" + xsetroot -name "$STATUS" else xsetroot -name "$(date)" fi