Storage

Published

Updated

🗄️

Space for files.

Storage is the persistent disk of a fortrabbit environment, for the deployed code, uploads and other runtime files. Every environment has it, in plans by size, with optional autoscaling.

Booking

Storage is part of every environment, in plans by size.

Configuration

The storage is a persistent file system with the deployed code and runtime data, such as uploads and cache files. It keeps its content across deployments and restarts. Reach it by SSH and SFTP, see the directory structure.

Scaling

With autoscaling, the plan follows the usage up and down. Without it, the storage stops at the plan size: once full, the app cannot write files until space is freed or the plan is scaled.

Why storage grows

Storage grows as the app writes files. The metrics show how fast. Unwanted growth often comes from:

  • Log files that are never rotated
  • Backups and database dumps kept on the disk
  • Large or abandoned uploads
  • Cache files and image transforms, often created by bots

Cleaning up the web storage

Before scaling up, check what fills the disk: find the large files with du over SSH, delete what is not needed, and fix the code or config that wrote it, for example with log rotation. The metric shows the new size after a few minutes.

Finding large files with du

du lists what takes the most space:

# List directories and files sorted by size in current directory
du -sh ./* | sort -h

# Show 10 biggest files and directories in all subdirectories
du -ah . | sort -rh | head -n 10
shell

du adds up file sizes, which differ from the space the files take on the volume. The dashboard shows the volume usage, the same number as df -h . over SSH.

Backups

The backup component backs up the storage. Backups do not count towards storage usage.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗