diff --git a/backup.sh b/backup.sh index 7ecbec1..5911caa 100755 --- a/backup.sh +++ b/backup.sh @@ -14,7 +14,7 @@ exec > >(logger -t backup) 2>&1 /usr/bin/restic -r /mnt/usb/backups/ unlock /usr/bin/restic -r /mnt/usb/backups/ backup --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose --json / | python3 /home/iboaz/backup_log.py "USB" /usr/bin/restic -r b2:debian-homelab-backups:/ unlock -/usr/bin/restic -r b2:debian-homelab-backups:/ backup --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose / | python3 /home/iboaz/backup_log.py "Backblaze" +/usr/bin/restic -r b2:debian-homelab-backups:/ backup --exclude-file=/home/iboaz/excludes.txt --one-file-system --verbose --json / | python3 /home/iboaz/backup_log.py "Backblaze" /usr/bin/restic forget --keep-last 1 --keep-daily 3 --keep-weekly 4 --keep-monthly 3 --keep-yearly 3 --prune /usr/bin/restic -r /mnt/usb/backups/ forget --keep-last 1 --keep-daily 7 --keep-weekly 8 --keep-monthly 3 --keep-yearly 3 --prune /usr/bin/restic -r b2:debian-homelab-backups:/ forget --keep-last 1 --keep-daily 3 --keep-weekly 4 --keep-monthly 3 --keep-yearly 3 --prune diff --git a/backup_log.py b/backup_log.py index 2b8a771..e4612c6 100644 --- a/backup_log.py +++ b/backup_log.py @@ -162,8 +162,7 @@ def main(): start_fields = [ ("Destination", destination, True), - ("Transferred", f"{human_bytes(bytes_done)}" + (f" / {human_bytes(total_bytes)}" if total_bytes else ""), True), - ("Files total", str(total_files), True), + ("Total Files", str(total_files), True), ] start_payload = { "username": USERNAME, @@ -186,10 +185,8 @@ def main(): in_title = f"Backup in progress ({percent * 100:5.2f}%)" in_fields = [ ("Destination", destination, True), - ("Transferred", f"{human_bytes(bytes_done)}" + (f" / {human_bytes(total_bytes)}" if total_bytes else ""), True), + ("Processed", f"{human_bytes(bytes_done)}" + (f" / {human_bytes(total_bytes)}" if total_bytes else ""), True), ("Files", str(total_files), True), - ("Elapsed", "0:00:00", True), - ("ETA", "calculating", True), ] in_payload = { "username": USERNAME, @@ -234,8 +231,8 @@ def main(): elapsed_hms = nice_hms(elapsed_s) fields = [ ("Destination", destination, True), - ("Transferred", f"{human_bytes(bytes_done)}" + (f" / {human_bytes(total_bytes)}" if total_bytes else ""), True), - ("Files processed", f"{files_done or '?'} / {files_total}", True), + ("Processed", f"{human_bytes(bytes_done)}" + (f" / {human_bytes(total_bytes)}" if total_bytes else ""), True), + ("Files Processed", f"{files_done or '?'} / {files_total}", True), ("Elapsed", elapsed_hms, True), ("ETA", eta_str, True), ] @@ -303,9 +300,9 @@ def main(): fields = [ ("Destination", destination, True), ("Duration", duration_str, True), - ("Backup size delta", size_str, True), - ("Files changed/new/unmodified", f"{files_changed} / {files_new} / {files_unmodified}", False), - ("Total files processed", str(total_files_processed), True), + ("Backup Size Delta", size_str, True), + ("Files Changed/New/Unmodified", f"{files_changed} / {files_new} / {files_unmodified}", False), + ("Files Processed", str(total_files_processed), True), ] payload = { "embeds": [ diff --git a/jellyfin/compose.yml b/jellyfin/compose.yml index f906102..a5b592c 100644 --- a/jellyfin/compose.yml +++ b/jellyfin/compose.yml @@ -8,11 +8,9 @@ services: - /home/iboaz/jellyfin/config:/config - /home/iboaz/jellyfin/cache:/cache - /mnt/usb/media/jellyfin:/usbmedia + - /mnt/samsung/media/jellyfin:/samsungmedia - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro - - type: bind - source: /home/iboaz/jellyfin/media - target: /media restart: always environment: - JELLYFIN_PublishedServerUrl=https://watch.msws.xyz