Skip to content

Releases: djekl/docker-github-backup

v1.0.9 — Reliability & correctness fixes

Choose a tag to compare

@djekl djekl released this 13 Jun 14:29
151530d

What's changed

This release is a significant reliability overhaul following a full code audit. All changes are backwards-compatible — existing configs and volume mounts continue to work without modification.

Bug fixes

  • Empty repository crash — repos with no commits (rev-parse HEAD → exit 128) previously printed Backup failed. They are now silently skipped with a clear Skipping …: empty repository message.
  • Single-token run always exited with code 1 — backup_repositories_for_token never returned a value; main() treated the implicit None as failure and called sys.exit(1) even on a successful run.
  • Token config parsing — indexing tokens_config[0] without a type check meant a plain string token would be iterated character-by-character. Now handles str (split on comma), list (including a single comma-separated element), and exits cleanly on missing/empty/wrong-type config.
  • mkdir return value — mkdir always returned True, so "Created directory" was printed even when the directory already existed. Now returns True only on actual creation.
  • Bare except: in mkdir — replaced with except OSError: so signals such as KeyboardInterrupt are not swallowed silently.
  • Dead EEXIST branch — the except Exception / errno.errorcode branch in mkdir was unreachable with exist_ok=True and has been removed along with the unused errno import.
  • download_zip error handling — the warning print was commented out (failures were silent); it has been restored. The catch now covers all RequestException (timeouts, connection errors) instead of only HTTPError. Uses the shared session object instead of a bare requests.get.
  • shlex.split injection risk in mirror_repo — building a shell string and splitting it risked misparse if base_path contained a quote character. Replaced with a direct argument list passed to execve.
  • Config overwritten on every container restart — backup.sh unconditionally copied config.json.example over config.json on each start, discarding any volume-mounted or previously written config. Now seeds the example only when no config.json exists.

Improvements

  • Disable Git auto-GC — git config --global gc.auto 0 is set in backup.sh to prevent Git's automatic garbage collection from running mid-backup and interfering with mirror clones.
  • Removed duplicate backup_single_repo definition — a copy-paste leftover that silently shadowed the first definition.

v1.0.8

Choose a tag to compare

@djekl djekl released this 12 Mar 18:30
3c64133

Full Changelog: v1.0.7...v1.0.8

v1.0.7

Choose a tag to compare

@djekl djekl released this 12 Mar 09:21
8e81e70

Full Changelog: v1.0.6...v1.0.7

v1.0.6

Choose a tag to compare

@djekl djekl released this 12 Mar 09:15
d1fd4e1

Full Changelog: v1.0.5...v1.0.6

v1.0.5

Choose a tag to compare

@djekl djekl released this 08 Feb 03:18
76d93e1

Full Changelog: v1.0.4...v1.0.5

v1.0.4

Choose a tag to compare

@djekl djekl released this 08 Feb 01:58
feab984

Full Changelog: v1.0.3...v1.0.4

v1.0.3

Choose a tag to compare

@djekl djekl released this 08 Feb 01:45
477109e

Full Changelog: v1.0.2...v1.0.3

v1.0.2

Choose a tag to compare

@djekl djekl released this 08 Feb 01:15
220e4e3

Full Changelog: v1.0.1...v1.0.2

Tagged v1.0.1

Choose a tag to compare

@djekl djekl released this 20 Jan 17:14
d68aaf3

Full Changelog: v1.0.0...v1.0.1

Tagged v1.0.0

Choose a tag to compare

@djekl djekl released this 20 Jan 15:51
9a7aad3
Modify mkdir for Unraid permissions and error handling

Updated mkdir function to set Unraid-compatible permissions and improved error handling.