Skip to Content
DocumentationGuidesAuto-backup your apps with cron

Auto Backup Your Apps

Automated backup scheduling is not built into Companion Hub yet. Today you take a backup with Backup now on the app’s page, Hub takes one before an update, and an agent can take one through the Hub MCP hub_backup_app tool.

See Backup & Restore for how per-app backups work and where they’re written.

Where a backup goes

A backup is one app’s data, its installed app files, and its user config, archived while the app is stopped and written under your Hub data root. Taking the backup is manual today; the two edges leaving the Hub box are the parts you can schedule yourself.

In the meantime

Two things you can automate yourself today:

Copy your backups offsite. Hub writes backups to <ROOT_FOLDER_HOST>/backups/. Syncing that directory to another disk or machine on a schedule protects you against drive failure, which per-app backups alone do not. Backup file names contain a colon, because they start with the app’s ID in <app>:<store> form, so the destination file system must accept colons. exFAT and Windows-formatted drives don’t.

Cap retention. Set Maximum backups to keep on the dashboard’s Settings tab (switch on Advanced settings there first), or MAX_BACKUPS in the env file β€” see Environment Variables. The default, 0, means no limit. With Advanced Mode on, an app’s own settings can override the limit for that app.

Hub also runs a weekly sweep that deletes the oldest backups beyond the global limit. When the limit is 0, the sweep keeps the newest five backups of each app, and it ignores an app’s own limit. Copy backups you need to keep offsite rather than relying on the limit alone.

An agent or script that holds an MCP key with write capability can start a backup with the hub_backup_app tool. You can also run the tool yourself from the tool catalog in Settings β†’ MCP. See Hub MCP.

Do not script tar over a running app’s data directory. Hub stops the app before archiving it precisely so the files are consistent; copying live data can produce a backup that won’t restore.

Last updated on