Skip to content

Releases: buildplan/restic-backup-script

v0.40

18 Nov 16:46
10658de

Choose a tag to compare

What's Changed

  • Improved backup function to allow single file backups.
  • All the notifications function now use jq for json payload.

Full Changelog: v0.39...v0.40

v0.39

25 Oct 21:35
cc1df1c

Choose a tag to compare

What's Changed

  • Added --find and --dump commands for searching files across snapshots and extracting individual files
  • Added --recovery-kit to generate a compact script that would serve as a disaster recovery kit to facilitate recovery
  • -r flag to all read commands and properly declaring variables before assignment

Full Changelog: v0.38.3...v0.39

v0.38.3

18 Oct 21:40
3191734

Choose a tag to compare

What's Changed

  • Improved setup instructions and added new features in README
  • Add default PATH (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin) on top of the script
  • Ensures script can find all required binaries (like restic in /usr/local/bin) when run from a non-interactive environment like cron, which has a minimal PATH.

Full Changelog: v0.38.2...v0.38.3

v0.38.2

08 Oct 12:15
a5761b8

Choose a tag to compare

What's Changed

  • Added --ls flag functionality with snapshot ID and optional path filtering
  • Updated help documentation and examples to include the new feature
  • Minor code cleanup removing extra whitespace and simplifying comments

Full Changelog: v0.38.1...v0.38.2

v0.38.1

05 Oct 11:09
47e18ad

Choose a tag to compare

What's Changed

Add stronger safety checks and UX around restoring to critical system directories, along with a version bump.

  • Bump script version to 0.38.1 and update SHA256.
  • Expand critical directory detection for restore destinations and require explicit confirmation.
  • Add logging when a dangerous restore is confirmed.

Full Changelog: v0.38...v0.38.1

v0.38

04 Oct 17:29
ecbc9bc

Choose a tag to compare

What's Changed

  • restore data in background or via cron job on a different server to create another copy of the data by @buildplan in #27

NEW FEATURES

  1. BACKGROUND RESTORE MODE (--background-restore)

    • NEW: Non-interactive restore that runs as a background process

    • Usage: sudo restic-backup.sh --background-restore <snapshot_id> <dest_path>

    • Features:

      • Accepts 'latest' as snapshot ID (auto-resolves to most recent snapshot)
      • Creates dedicated timestamped log files for each restore job
      • Runs in detached background process with output redirection
      • Sends notifications on completion/failure via configured channels
      • Automatically handles file ownership for /home/* paths
      • No terminal interaction required after launch
    • Implementation Details:

      • Uses subshell backgrounding: ( ... ) > "$restore_log" 2>&1 &
      • Log files: /tmp/restic-restore-${snapshot_id:0:8}-$(date +%s).log
      • Integrates with notification system (ntfy, Discord, Slack, Teams)
      • Runs pre-flight checks before starting background job
    • Use Cases:

      • Large dataset restoration without blocking terminal
      • Remote server restores over SSH
      • Long-running operations that should survive terminal disconnection
  2. SYNC RESTORE MODE (--sync-restore)

    • NEW: Non-interactive foreground restore for automation/cron

    • Usage: sudo restic-backup.sh --sync-restore <snapshot_id> <dest_path> [paths...]

    • Features:

      • Runs synchronously (blocks until completion)
      • Returns proper exit codes for scheduler/cron monitoring
      • Accepts optional specific file/directory paths to restore
      • Integrates with Healthchecks.io for success/failure pinging
      • Supports 'latest' snapshot ID resolution
      • Automatic ownership handling for user directories
    • Implementation Details:

      • Exit code 0 on success, 1 on failure
      • Healthchecks.io ping on completion: $HEALTHCHECKS_URL or $HEALTHCHECKS_URL/fail
      • Full logging to main log file
      • Notification support for all configured channels
    • Use Cases:

      • Automated backup pull for 3-2-1 backup strategy
      • Cron-scheduled regular restores to secondary servers
      • DR (Disaster Recovery) automation workflows
      • CI/CD backup restoration pipelines

Full Changelog: v0.37.2...v0.38

v0.37.2

02 Oct 19:14
1518712

Choose a tag to compare

What's Changed

Full Changelog: v0.37.1...v0.37.2

v0.37.1

01 Oct 23:36
31e260a

Choose a tag to compare

What's Changed

  • Script self-update and restic update now show release notes by @buildplan in #24
  • requires jq for release notes and restic stats - jq dependency check in --test
  • removed broken v0.37 release

Full Changelog: v0.36...v0.37.1

v0.36

29 Sep 00:03
4ae8c4c

Choose a tag to compare

What's Changed

  • Show progress bars in verbose mode by @buildplan in #23
  • Since v0.34 flexible shebang check in the self-update function will break the backward compatibility for self-update, so a one-time manual update is required. Which can be done with:
    curl -Lo restic-backup.sh "https://raw.githubusercontent.com/buildplan/restic-backup-script/main/restic-backup.sh" && chmod +x restic-backup.sh

Full Changelog: v0.35...v0.36

v0.35

28 Sep 22:21
5b20444

Choose a tag to compare

What's Changed

  • Fix performance tuning and verbose flag by @buildplan in #21
  • flexible shebang check in the self-update function will break the backward compatibility for self-update, so a one-time manual update is required. Which can be done with:
    curl -Lo restic-backup.sh "https://raw.githubusercontent.com/buildplan/restic-backup-script/main/restic-backup.sh" && chmod +x restic-backup.sh

Full Changelog: v0.34...v0.35