Every order we've ever taken
Russ's old script made room on a full server by deleting its biggest file. It was not Ines's huge new sofa photo but every order the company had ever taken.
The mistake
A disk-cleanup script frees space by deleting whatever file on the server is largest. It picks by size alone and never checks what the file is. On a server that also holds the order database, the largest file is usually the database itself. So when a big upload fills the disk, the script deletes the company's order records and leaves the upload that caused the problem. Automatic cleanup should only delete from an allowlist of known disposable locations, such as caches, temp directories and rotated logs, and should never touch data it can't identify.
- disk-space
- ops
- cleanup-scripts
- ecommerce
- design-system