diff --git a/.env.example b/.env.example index 11f42b9..623c21e 100644 --- a/.env.example +++ b/.env.example @@ -161,6 +161,8 @@ BACKUP_SFTP_CONNECTIONS=2 # Optional upload cap in KiB/s for restic and the mirror, e.g. 5000 (about 40 Mbit/s). # Empty = uncapped. Useful while the first upload of a large library runs. BACKUP_LIMIT_UPLOAD_KBPS= +# Progress lines in the backup log, per second: 0.0166 is one a minute. 0 for none. +RESTIC_PROGRESS_FPS=0.0166 BACKUP_CRON_SCHEDULE=0 * * * * BACKUP_KEEP_HOURLY=48 BACKUP_KEEP_DAILY=14 diff --git a/docker-compose.yml b/docker-compose.yml index 645691e..619196a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -90,6 +90,9 @@ services: # Parallel SFTP connections, and an optional upload cap in KiB/s (empty = none). - BACKUP_SFTP_CONNECTIONS=${BACKUP_SFTP_CONNECTIONS:-2} - BACKUP_LIMIT_UPLOAD_KBPS=${BACKUP_LIMIT_UPLOAD_KBPS:-} + # restic shows no progress when its output is a log rather than a terminal, so a + # day-long first upload was silent from start to finish. One status line a minute. + - RESTIC_PROGRESS_FPS=${RESTIC_PROGRESS_FPS:-0.0166} - BACKUP_CRON_SCHEDULE=${BACKUP_CRON_SCHEDULE:-0 * * * *} - BACKUP_KEEP_HOURLY=${BACKUP_KEEP_HOURLY:-48} - BACKUP_KEEP_DAILY=${BACKUP_KEEP_DAILY:-14} diff --git a/ops/backup/README.md b/ops/backup/README.md index 3434720..2a343e1 100644 --- a/ops/backup/README.md +++ b/ops/backup/README.md @@ -424,6 +424,13 @@ repository lock. The first run sends the whole library, which over a home line can take most of a day (restic prints an ETA). Later runs send only what changed, in minutes. +- **The log prints one progress line a minute** (`[1:23:45] 12.34% … files … ETA …`; + `RESTIC_PROGRESS_FPS` in `.env` changes the rate). Between them it is quiet, not + stuck. A `previous run still going, skipping` line from an hourly tick is proof the + run is alive: it is printed only while the run holds its lock. To see how much has + landed on the NAS, `docker compose exec backup rclone size nas:/GeckoNotes/gam/restic` + (your `BACKUP_SFTP_REMOTE_PATH`), a few minutes apart; or watch NET I/O climb in + `docker stats gam-backup-1`. - **If it dies, run the same `exec` line again.** restic saves its index as it goes, so what already reached the NAS is not sent twice; the rerun picks up roughly where the last one stopped. The dead run's leftover repository lock is cleared automatically.