SelfHostPlanner
Guide 02 · Storage

Your library is not your disk size.

A 2TB photo library does not belong on a 2TB drive. Plan originals, generated media, growth, operational headroom and recovery copies separately.

Official storage fact
Immich says thumbnails and transcoded video can increase a photo library by 10–20% on average. The planner interpolates inside that range using video share; that is our model, not an official Immich formula.

The five layers

  1. Originals today. Measure actual photos and videos, not the drive's marketed capacity.
  2. Growth. Compound annual growth across the planning horizon.
  3. Generated media. Add 10–20% as the documented average range.
  4. Headroom. Keep 15–25% free so imports, database work and maintenance do not run at the edge.
  5. Independent backups. Add copies that can survive deletion, corruption, theft or server failure.

Mirror is not backup

RAID or mirrored disks can keep a service running after a drive failure. They normally reproduce accidental deletion and corruption too. Count an independent copy only when it has its own recovery path, preferably with version history and at least one off-site location.

Back up both database and files

Immich's database contains metadata and relationships; uploaded assets live in the filesystem. A recoverable system needs both. Immich includes automatic database backups, but its documentation explicitly says these do not contain photos or videos. Test a restore before treating any backup as trustworthy.

Example

A 2TB library growing 25% annually becomes about 3.91TB of originals after three years. At 13.5% generated-media overhead and 20% free-space headroom, the primary copy needs about 5.55TB usable capacity. One independent backup doubles the storage footprint before drive-size rounding.

指南 02 · 存储

媒体库大小不等于硬盘大小。

2TB 的照片库不应放进 2TB 硬盘。原始文件、生成媒体、增长、运行余量与恢复副本必须分开计算。

官方存储事实
Immich 表示,缩略图与转码视频平均可让照片库增加 10–20%。本工具根据视频占比在该范围内插值;这是我们的模型,不是 Immich 官方公式。

五个层次

  1. 当前原始文件。测量真实照片和视频,而不是硬盘标称容量。
  2. 增长。在规划周期内按年复合增长。
  3. 生成媒体。根据官方平均范围增加 10–20%。
  4. 预留空间。保留 15–25%,避免导入、数据库和维护运行在容量边缘。
  5. 独立备份。增加可抵御误删、损坏、失窃或主机故障的副本。

镜像不等于备份

RAID 或磁盘镜像能在硬盘故障后维持服务,但通常也会同步误删与损坏。只有具备独立恢复路径的副本才算备份,最好带版本历史,并至少有一份异地副本。

数据库与文件都要备份

Immich 数据库存放元数据与关系,上传资产则位于文件系统。可恢复系统必须同时保护两者。Immich 提供自动数据库备份,但官方明确说明其中不含照片或视频。未测试恢复之前,不能把任何备份视为可靠。

示例

2TB 媒体库若每年增长 25%,三年后原始文件约 3.91TB。加入 13.5% 生成媒体与 20% 预留空间后,主副本约需 5.55TB 可用容量。若再保留一份独立备份,四舍五入到硬盘容量前,存储规模需要翻倍。

Primary sources