# Upgrades and backups

> Upgrading the engine and what to back up.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://files.docs.sypnia.com/self-hosting/upgrades/

For agents: Files upgrades: new image or stack update; migrations on start; refuses newer schema. Back up Postgres (sypnia_files) and storage (versioning/replication) together; sypnia-files doctor reports orphan rows and orphan files.

Upgrade by pulling a new image (or updating the stack); the engine runs schema migrations on start and refuses to start against a newer schema than it knows. Back up two things: the Postgres database (`pg_dump` of `sypnia_files`, with your tables) and the storage bucket (versioning or replication). A backup of only one of them leaves rows without files or files without rows; `sypnia-files doctor` reports both kinds.
