mirror of
https://github.com/MSWS/Homelab.git
synced 2025-12-05 14:50:25 -08:00
Update backup script again
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user