Skip to content
Using spredr

Persistent volumes

A volume keeps files across deploys: an SQLite database, what your users upload, a cache. It is encrypted on its machine and backed up every 15 minutes.

terminal
$spredr volume set mi-api --size 5
$spredr volume mi-api

Also from the panel (Settings › Disk) or in your spredr.json, with "volume": { "path": "/data", "maxGb": 5 } inside deploy. A spredr.json that leaves it out keeps it as it is: it never removes it.

One copyA service with a volume runs as a single copy: two cannot write to the same disk.
Its machineIt stays on the machine its data is on and never moves by itself. It only goes to machines with room for all of its size.
EncryptedEach volume has its own key, sealed to its machine. It never shows in the panel or the terminal.
BackupsEvery 15 minutes, encrypted, off the machine. The panel tells you when the last one was and whether one failed.
SizeYour plan includes some GB for all your volumes; past them, with pay as you go. If a volume holds more than its size, the panel tells you.
restore

Back to a backup

Puts the volume back as it was in a backup: the latest, or the one you pick with --from. What it held is kept aside on its machine, not deleted. The service stops for a few seconds meanwhile.

terminal
$spredr volume restore mi-api --yes
remove

Remove the volume

Deletes its key: what it held, and its backups, can no longer be read, and the backups are deleted from storage as soon as its machine lets go of it. It asks you to type the service's name. A service with a volume is not deleted until its volume is removed.

terminal
$spredr volume rm mi-api --confirm mi-api