Update README, add logs.sh

This commit is contained in:
Jim Paris 2025-03-15 11:08:52 -04:00
parent a9ab963d49
commit 90e9310ae0
3 changed files with 14 additions and 8 deletions

View File

@ -88,7 +88,7 @@ EOF
# Copy templated files, filling in templates as needed
install_templated_files()
{
for i in README.md notify.sh; do
for i in README.md notify.sh logs.sh; do
sed -e "s!\${HOSTNAME}!${HOSTNAME}!g" \
-e "s!\${BORG_DIR}!${BORG_DIR}!g" \
-e "s!\${BORG_BIN}!${BORG_BIN}!g" \

View File

@ -9,7 +9,6 @@ Run on client:
Customize `/opt/borg/config.yaml` as desired.
Cheat sheet
===========
@ -29,13 +28,10 @@ See when next backup is scheduled:
systemctl list-timers ${SYSTEMD_UNIT}.timer
See status of most recent backup attempt:
See log of most recent backup attempt:
journalctl --unit ${SYSTEMD_UNIT} --since "$(systemctl show -P ExecMainStartTimestamp ${SYSTEMD_UNIT})"
Watch live log:
journalctl --all --follow --unit ${SYSTEMD_UNIT}
${BORG_DIR}/logs.sh
${BORG_DIR}/logs.sh -f
Start backup now:
@ -61,6 +57,13 @@ Mount and look at files:
sudo -s # to explore as root
sudo umount mnt
Update borg-setup from git:
cd /opt/borg
sudo git remote update
sudo git rebase origin/master
sudo ./inital-setup.sh --update
sudo git commit -m 'Update borg-setup'
## Compaction and remote access

3
templates/logs.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
exec journalctl --all --unit ${SYSTEMD_UNIT} --since "$(systemctl show -P ExecMainStartTimestamp ${SYSTEMD_UNIT})" "$@"