Why a production studio writes its own software: lessons from 180 TB of footage

180 TB of footage, 93 client folders, 718 shoot days. Our NAS indexer, PostgreSQL, the pre-delivery QC gate, and a backup design on MinIO and a Hetzner Storage Box.

Published Updated 16 min read

Tags: SoftwareArchiveInfrastructure

Cover: Why a production studio writes its own software: lessons from 180 TB of footage

Our archive is now about 180 TB. The network storage (NAS) holds 93 client folders with 718 shoot days and 745 reels, and about 1.6 TB of raw footage arrives every month. At that scale, “where is the raw footage for that video?”, “does this reel meet the delivery spec?” and “what would we lose if the office burned down?” can no longer be answered from memory or by clicking through Finder.

This is why a video studio in Trabzon writes its own software, how the system is built, and how we tier our backups.

Why should an archive be a database, not a pile of folders?

Every client folder follows the same numbered template:

Folder Holds
00_MASTER delivered files: reels, stories, posts, covers, photos, 360
01_RAWFootages camera originals: N.gün - DD.MM.YYYY/<camera>/
02_Projects one Premiere / After Effects project per deliverable, same name as the export
03_Music&SFX … 07_Panorama music, brand assets, designs, photos, panoramas
08_BlackHole inbox for unsorted material
09_Reports&Statistics, 10_PreProduction reports, consent records, briefs, shoot plans

A template only helps if something checks it, and re-scanning 180 TB for every question is not an option. So we keep an index of the archive: the path, size, modification time, codec, duration, resolution, frame rate and loudness of every file sit in PostgreSQL. Questions like “how many hours did we film for this client last month, and on which cameras?” or “which reels are missing a cover?” come back in seconds.

What does the system’s architecture look like?

The whole platform lives in one git repository. The server side is a single Go program, 404vd; the same binary starts in different roles: api, scheduler, worker and indexer. It runs 24/7 in Docker containers under Colima on a Mac mini in the office. Updates go from a laptop to the Mac mini with git push and are rebuilt with a single make up.

 Cameras (Sony, DJI, iPhone)
        │  card offload
        ▼
 NAS · SMB share "work/"  ── archive of record, primary copy
        │  read-only CIFS mount
        ▼
 404vd · role: indexer
   mount gate → tiered directory polling → settle
   → move / missing detection → ffprobe / exiftool probes
        │  files, file_media, file_events
        ▼
 PostgreSQL 17 (+ pgvector)  ◄──  404vd · roles: api · scheduler · worker
        │                           job table (FOR UPDATE SKIP LOCKED)
        ▼
 Panel (:5173)  shoots, deliverables, approvals, reports  ── system of record
 Studio (:5174) subtitles, covers, voiceover, QC tools

The Panel is the system of record for the work: a job’s brief, shoot day, delivered files, versions and approval live in one place. The Studio collects the post-production tools. How the shoot day itself is planned is in our shoot-day playbook.

Some architecture decisions are deliberately plain:

  • One binary, several roles. Go produces statically linked binaries by default, so moving a service is often a matter of copying one file.
  • No separate queueing system. Jobs wait in a PostgreSQL table. Each worker claims an unlocked row with FOR UPDATE SKIP LOCKED; the PostgreSQL documentation describes that option for exactly this case, multiple consumers reading a queue-like table. Every job has a dedupe key and a heartbeat, and a job whose heartbeat is more than two minutes old goes back into the queue.
  • Every service reports on itself. Structured JSON logs, a /healthz check and /metrics for Prometheus on every long-running service.
  • It brings itself back up. A keeper checks the Docker runtime and stopped services every minute, re-asserts the network route to the NAS and restarts any service that is unhealthy twice. After a power cut the machine boots and the stack comes back on its own. Deploying a new version is always a human decision.

How does the indexer keep 180 TB up to date?

The indexer mounts the share read-only and never changes anything. Its loop:

  1. Mount gate. The share root must list within 10 seconds and contain at least 50 folders. If not, the indexer pauses and marks nothing as missing.
  2. Tiered polling. Active clients’ delivery folders, this year’s raw footage and any folder that changed in the last 14 days are “hot” and checked every two minutes. Other folders of active clients are checked every 30 minutes, and passive clients nightly. Every night at 03:00 a full reconcile runs with Go’s filepath.WalkDir, which, unlike the older Walk, doesn’t call Lstat on every file; over the network that difference is noticeable. Cache and trash folders are skipped and counted as one row.
  3. Settling. A new or changed file counts as “settling” until two observations at least 60 seconds apart show the same size and modification time. A half-copied camera card is never probed.
  4. Move detection. A file that disappears and a new file with the same size and time under the same client count as a move. The file keeps its database ID, so the deliverable record, cover and subtitle job attached to it stay linked.
  5. Tombstones. A file that is no longer seen is not deleted; its missing_since field is set. If it comes back, it is marked restored.
  6. Probing. Settled videos are probed with ffprobe -probesize 5M, photos with batched exiftool. +faststart is read from the atom order in the file’s first 64 KB, and the loudness of delivered videos is measured by a nightly ebur128 pass. During the day, while editors work, only one probe runs at a time; at night, three.

Raw footage is probed only for new arrivals and the last 60 days. The first full reconcile took 13.7 minutes over the office network, listing and reading metadata only.

What we learned along the way:

  • A file name is not an identity. Camera names such as “C0511.MP4” repeat dozens of times across the archive. A file is identified by its path, size and hash together.
  • Turkish characters are a trap. Names containing “ğ”, “ü” or “ş” can be stored in two Unicode forms, NFC and NFD; the Linux SMB client matches names byte for byte, and some files won’t open from a Mac. The database keeps both the NFC form and the raw bytes of every name, opening a file tries both spellings, and new files are always written in NFC.
  • Regenerable files take real space. The crawl found 2.19 TB of regenerable Premiere cache and preview files on the share. With the volume more than 90 % full, that is not a small number.

What rules must a tool that writes to the archive follow?

The NAS is the archive of record for client work and, today, the primary copy of most files. So every tool that writes to it follows the same contract:

  • The default run is a dry run; a real change requires an explicit --apply.
  • Nothing is overwritten and nothing is deleted. Renames go through temporary names; a file that has to go is moved to a quarantine folder.
  • Every run leaves an undo CSV that logs every changed path.
  • A person approves any operation that touches more than one client folder.

In the platform, a single writer module enforces this contract; nothing else writes to the NAS.

What do we check automatically before delivery?

Every reel has to meet the same technical standard, and checking that by eye on every file is slow and error-prone. The QC engine evaluates the values the indexer measured with a pure function: it doesn’t touch the database and is verified with table-driven tests.

Check What it looks at Severity
Technical spec 1080×1920, H.264, yuv420p, +faststart Error
Frame rate 25 or 30 fps, no variable frame rate Error
Audio an audio track, 48 kHz AAC, about −14 LUFS, true peak ≤ −1 dBTP Error
HDR an HLG/PQ export where SDR is expected? Error
Cover does every reel have a cover image with the same name? Error
Project file does every reel have a project file with the same name? Warning
Naming NN_Client - Title; no “final”, “v2” or “copy” suffixes Warning
Folder template do all eleven top-level folders exist, spelled correctly? Warning
Shoot-day name is the day folder named “N.gün - DD.MM.YYYY”? Warning
Cache has Premiere’s media cache been written to the network share? Error
File name is it in a single Unicode form, and does it open from a Mac? Error
Path length under 200 characters and at most 8 levels deep? Info

A file that hasn’t been probed yet is “unknown”; a reel never passes just because its name and cover are right. The checks only report; a fix is a button a person presses. The finishing steps after the edit are in reel finishing and QC, our colour workflow in colour pipeline from log to delivery, and how a reel is structured in anatomy of a venue reel.

How do you back up 180 TB, and which tier goes where?

Never deleting anything in the archive does not prevent data loss: a disk failure, fire, theft or ransomware can take the NAS itself. Our backup design follows the classic 3-2-1 rule: three copies of the data, on two different media, one of them offsite.

                    ┌──────────────────────────────┐
 NAS (primary)  ───►│ backup client (in the office)│
 + Postgres dump    │ snapshot per client, tags,   │
                    │ client-side encryption       │
                    └──────┬───────────────┬───────┘
              LAN 1 GbE    │               │  office uplink
              ≈110 MB/s    ▼               ▼  (bounded by upload speed)
        MinIO (in the office, separate   Hetzner Storage Box (offsite)
        hardware): S3 API, versioned     SFTP / SMB / WebDAV / rsync,
        buckets, object lock             restic · rclone · BorgBackup,
        (governance), full hot tier      snapshots, selected tier

Tiers. Not all data has the same value:

Tier Contents Regenerable? Where
Critical and small PostgreSQL dump, 00_MASTER, 02_Projects, 04_Assets, 09_Reports&Statistics, 10_PreProduction No NAS + MinIO + Storage Box
Large and valuable 01_RAWFootages, 06_Photo, 07_Panorama No, but rarely read NAS + MinIO; offsite copy planned as a cold tier
Regenerable Premiere previews and auto-saves, media cache, proxies, thumbnails, the index in PostgreSQL Yes Not backed up

A delivered reel is a few hundred megabytes; its raw footage is often tens or hundreds of gigabytes.

What isn’t backed up? Previews, auto-saves and caches (2.19 TB in the crawl) are regenerated, not copied. The index could be rebuilt from the NAS, but its dump is still backed up, because it holds records the NAS doesn’t: deliverable versions, approvals and tasks.

What does MinIO do for the second copy in the building?

MinIO is an object storage server written in Go and compatible with the Amazon S3 API. For a second copy on hardware separate from the NAS, two features matter:

  • Versioning. Every object written under the same name creates a new version; a delete adds a delete marker rather than removing the data.
  • Object lock. According to the MinIO documentation, object locking requires versioning. In governance mode, a lock can only be bypassed by users with a specific permission; in compliance mode, no one, including the root user, can change the object during the retention period. Even if ransomware gets hold of the backup client’s keys, it cannot delete locked versions.

restic can write to MinIO directly through its S3 backend; it splits data into chunks, deduplicates them and encrypts them before sending. There is one tension to plan for: restic’s prune step, which cleans out old snapshots, cannot delete data packs whose lock hasn’t expired. Keeping the retention period short and pruning only data that falls outside it is a common approach, and it is what our design does.

A note: MinIO’s community edition is now distributed as source code only, and its GitHub repository was archived in 2026; no new binaries are published. So we tie the design to the S3 API rather than to one product. Any S3-compatible server fits the same slot; only the endpoint changes.

How is a Hetzner Storage Box used for the offsite copy?

A Hetzner Storage Box is storage space built for offsite backups. According to Hetzner’s documentation it can be reached over SFTP and SCP (port 22), FTP/FTPS (port 21), SMB and WebDAV, and the extended SSH service on port 23 also supports rsync and BorgBackup. Hetzner lists restic and rclone among the supported tools as well. Manual and automatic snapshots are available, 10 to 40 depending on the plan. Up to 100 sub-accounts per box, each locked to its own subdirectory.

Three details shape the design:

  • The capacity limit. A single Storage Box tops out at 20 TB. 180 TB doesn’t fit in one box, which turns tiering from a preference into a requirement. The critical tier goes offsite to a Storage Box. For raw footage, several boxes or a cold medium such as LTO are being weighed together with a per-client retention decision.
  • Snapshots are a second line of defence. Storage Box snapshots are managed separately from the data the backup client writes. Even if a client-side bug or an attack corrupts today’s backup, yesterday’s snapshot is still there. Snapshots consume box capacity as data changes.
  • Choice of tool. restic writes to the box over SFTP, rclone over SFTP or WebDAV, and BorgBackup uses the SSH service on port 23. All three deduplicate and encrypt on the client side. The platform’s roadmap names restic for database dumps; because the same repository format works on both MinIO and the Storage Box, one tool writing to two targets also keeps the restore procedure single.

To be clear about where things stand today: the database dump is taken by hand with make db-dump, and the restore steps are written in the runbook. Scheduled, verified offsite backups are the stage we are rolling out with this design.

Bandwidth: how long does it take to send 180 TB offsite?

The most underestimated part of backup design is physics. Inside the office, a 1 GbE link reads about 110 MB/s in practice. Going offsite is bounded by the internet line’s upload speed:

Link Practical speed First 180 TB copy Monthly 1.6 TB increment
Office 1 GbE (NAS → MinIO) ≈110 MB/s ≈19 days ≈4 hours
1 Gbit/s upload ≈110 MB/s ≈19 days ≈4 hours
100 Mbit/s upload ≈12.5 MB/s ≈167 days ≈36 hours

The maths is simple: 180 TB ÷ 12.5 MB/s ≈ 14.4 million seconds, five and a half months, and that assumes the line does nothing but backups.

Hence two rules:

  1. Seeding is ordered by value. The first offsite copy starts with the critical tier: the database dump, delivered files, projects and brand assets. That tier completes in days; raw footage follows in night windows, active clients first.
  2. After that, it’s incremental. A deduplicating backup tool sends only new and changed chunks after the first copy. 1.6 TB of raw footage a month moves over a few nights even on a 100 Mbit/s line. The indexer’s change log (file_events) lets a backup job target only the client folders that changed that day.

Encryption and KVKK: how does data leave the building?

Client footage often shows recognisable people, and under KVKK, Turkey’s data-protection law, that is personal data. So offsite backups follow three rules:

  • Data is encrypted before it leaves the building. restic, rclone’s crypt layer or BorgBackup encrypt data on the client before it is sent; the storage provider only sees unreadable blocks. The encryption key never lives on a backup target; it is kept in two separate places, independent of the targets. Losing the key means losing the data.
  • One snapshot per client. Taking backups as tagged snapshots per client folder makes it possible to forget one client’s data once its retention purpose ends. Personal data has to be deleted within a reasonable time after that purpose ends, and the obligation covers backups too.
  • Least privilege. The backup client can only write to its own sub-account, and on MinIO it has no permission to delete locked versions. A stolen key does not mean the whole backup can be wiped.

The consent process on shoot days is in filming in venues and KVKK, and the legal limits that apply to venue content in Law 7584 and venue content.

Why is a restore test more important than the backup?

A backup that has never been restored is only a hope. The design has three levels of testing:

  • Integrity checks. restic’s check command verifies the repository structure, and --read-data-subset actually reads part of the data back.
  • File restores. A delivered file and a raw clip from a randomly chosen client are restored to a local disk, and their size and hash are compared with the index. Because the index identifies files by path, size and hash, this check is automatic.
  • System restores. The PostgreSQL dump is loaded into an empty database with pg_restore, and the platform is started on it.

Every backup job publishes its last successful run on /metrics; an alert that says “last offsite backup is older than 48 hours” is far cheaper than a backup that fails silently.

Local AI: why does the footage stay in the building?

AI tasks such as transcription and searching the archive by what’s in the picture run on our own machines by default. The vectors used for visual search are designed to live in PostgreSQL’s pgvector extension, and they are not biometric templates. Face detection is used only to flag “this clip shows someone recognisable”; we do not build face recognition or systems that group people by identity. Footage showing identifiable people never goes to a cloud service without a consent record and explicit approval for that specific task. For every AI step we ask where it runs and whether identifiable people are involved.

How does the same engineering serve clients?

The same discipline goes into the systems we build for clients: booking, membership, payment flows where card details are entered only on the provider’s 3-D Secure page, WhatsApp reminders and reporting. All of it is Go, with health checks and metrics, and handles personal data in line with KVKK. It can run in Turkish, English, Arabic and Russian; what a full right-to-left Arabic layout takes is covered in our multilingual website article.

Questions to ask about your own archive or software

  • Does a database know where every file in your archive is, or does one person’s memory?
  • How many copies of your data exist, how many on a different medium, and how many outside the building?
  • Have you worked out how many days the first offsite copy takes at your upload speed?
  • Is data encrypted before it leaves the building, and where does the key live?
  • When did you last actually restore a file?
  • When something breaks, who notices first: you, your client, or a monitoring tool?

In a studio that works from a 180 TB archive, good software and a properly built backup are part of production.

All our services are on the services page. If you’d like to talk about your archive, your backup setup or a software idea for your business, get in touch.

Frequently asked

Why would a video studio develop software?

Scale. Our archive has reached 180 TB across 93 client folders, 718 shoot days and 745 reels, and about 1.6 TB of raw footage arrives every month. At that size, finding files, holding the delivery standard and designing backups properly needed tools that off-the-shelf products didn't provide, so we wrote our own in Go: an indexer, a QC engine and a backup plan built on the index.

How do you back up a 180 TB archive offsite?

Not all at once. Sending 180 TB takes about 167 days at 100 Mbit/s upload and about 19 days at 1 Gbit/s. So the small tier that cannot be regenerated (database dumps, delivered files, projects, brand assets) goes first, and incremental backups then move only what changed. Raw footage is planned as a separate cold tier.

What do a Hetzner Storage Box and MinIO do in this setup?

MinIO provides S3-compatible object storage for the second copy inside the building; versioning and object lock mean data deleted by mistake or by an attacker can be recovered. The Hetzner Storage Box is the offsite copy, reachable over SFTP, SMB, WebDAV, rsync, BorgBackup, restic and rclone, with snapshots. A single Storage Box tops out at 20 TB, so the offsite tier is filled selectively.

What do you check automatically before a reel is delivered?

1080×1920, H.264, yuv420p, +faststart, a constant frame rate, an audio track, 48 kHz AAC and loudness around −14 LUFS. We also check that every reel has a cover image and a project file with the same name, and that file names follow the template. The checks report; they never move or delete a file.

Does client footage go to the cloud for AI or backups?

AI tasks run on our own machines by default, and footage showing identifiable people never goes to a cloud service without a consent record and explicit approval for that task. Offsite backups are encrypted on the client side before they leave the building, so the storage provider only sees unreadable blocks. We do not build face recognition or systems that group people by identity.

Sources

What this piece draws on

  1. docs.hetzner.comHetzner Docs: Storage Box overview (protocols, ports, snapshots, sub-accounts)
  2. docs.hetzner.comHetzner Docs: Storage Box SSH keys and SFTP/rsync/BorgBackup on port 23
  3. restic.readthedocs.iorestic documentation: Preparing a new repository (SFTP, S3/MinIO, rclone backends)
  4. docs.min.ioMinIO documentation: Object locking and immutability
  5. github.comMinIO GitHub repository: status of the community edition
  6. postgresql.orgPostgreSQL documentation: SELECT, the locking clause and SKIP LOCKED