explaingit

akshayskrishna/immich-incremental-snapshot

Analysis updated 2026-05-18

1ShellAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

A space-saving shell script that backs up a large Immich photo library incrementally, hardlinking unchanged files between snapshots.

Mindmap

mindmap
  root((Immich Incremental Snapshot))
    What it does
      Full backup on first run
      Hardlinks unchanged files
      Copies only changed files
      Timestamped snapshots
    Tech stack
      Bash
      Docker
      PostgreSQL
      rsync link-dest
    Use cases
      Backup large photo libraries
      Save storage on repeat backups
      Scheduled snapshot history
    Audience
      Self hosters
      Home lab users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Back up a multi-terabyte Immich photo library repeatedly without recopying unchanged files every time.

USE CASE 2

Keep a rolling history of timestamped snapshots so you can roll back to an earlier point if needed.

USE CASE 3

Schedule automatic incremental backups of a self-hosted Immich server via the script's built-in cron setup.

What is it built with?

BashDockerPostgreSQLrsync

How does it compare?

akshayskrishna/immich-incremental-snapshot100/dotfilesadams549659584/my-openwrt-actions
Stars111
LanguageShellShellShell
Last pushed2016-11-182020-06-06
MaintenanceDormantDormant
Setup difficultyeasyeasyhard
Complexity2/51/53/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires bash, docker, rsync, and gzip already installed, the first run is a full copy before incremental savings kick in.

In plain English

Immich Incremental Snapshot is a shell script for backing up an Immich installation, the same kind of self-hosted photo and video library covered by a sibling project, but built specifically for large libraries where making a full copy every time would waste a lot of storage. The first time it runs, it creates a complete snapshot. Every run after that, it uses a feature of rsync called link-dest to reuse unchanged files from the previous snapshot as hardlinks, rather than copying them again, while only actually copying files that are new or have changed. Like its full-backup sibling, the script asks the same setup questions: which folder holds the Immich Docker Compose files, where backups should be stored, whether there is a separate external library to include, and whether to install an optional cron schedule with choices like daily, weekly, or monthly. Before copying anything, it checks the backup folder for the most recent existing snapshot to use as the base for the incremental copy, if none exists yet, it just does a full copy instead. It also creates a compressed PostgreSQL database dump each run, briefly stops the Immich containers so the copy is not made mid-write, and restarts Immich afterward even if a step along the way fails. Each backup run produces a timestamped snapshot folder, with a "latest" link pointing at the newest one, and each snapshot contains its own database dump, media folder, external library folder if configured, and logs. The README notes that because the database dump is included in full each time, any user on the Immich instance can be restored from any single snapshot. It also suggests avoiding a separate external library where possible, recommending instead that external media be synced into Immich's main library using a different tool called immich-go. Requirements are the same as the full-backup version: bash, docker, rsync, gzip, and standard Unix utilities, with figlet as an optional extra for a nicer looking banner. A companion restore script in a separate sibling repository can restore from these snapshots, and it checks a saved manifest against the target install before restoring. No license is stated in the README.

Copy-paste prompts

Prompt 1
Explain how Immich Incremental Snapshot's rsync --link-dest approach saves storage compared to a full backup every run.
Prompt 2
Walk me through running Immich Incremental Snapshot interactively for the first time on my Immich Docker deployment.
Prompt 3
Help me build a non-interactive cron command for Immich Incremental Snapshot with a fixed backup and media directory.
Prompt 4
Show me the backup folder layout Immich Incremental Snapshot creates and what's inside each timestamped snapshot.

Frequently asked questions

What is immich-incremental-snapshot?

A space-saving shell script that backs up a large Immich photo library incrementally, hardlinking unchanged files between snapshots.

What language is immich-incremental-snapshot written in?

Mainly Shell. The stack also includes Bash, Docker, PostgreSQL.

How hard is immich-incremental-snapshot to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is immich-incremental-snapshot for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.