Sharing an app's data
An app that keeps files in a persistent storage path (for example Vaultwarden’s /data) can let the apps and cron jobs linked to it see those files.
- On the app, set Persistent storage path (say
/data) and Share data with linked apps and cron jobs to Read-only or Read-write. It is off by default; the app’s own setting decides the mode for everyone linked. - Link the app and the cron job (or another app) on the canvas.
- The linked node sees the files at
/mnt/<app label>(lower-case, dashes for spaces):/mnt/vaultwardenfor an app called “Vaultwarden”. A cron job picks it up on its next run; an app on its next deploy.
Rules: the link must be live (not staged), and both nodes must be in the same workspace. Only apps share data; databases and other kinds are not shared this way.
Backing up a live SQLite database
Section titled “Backing up a live SQLite database”Copying the file while the app writes can give a broken copy. Run SQLite’s own backup in the cron job, from an image that has sqlite3:
sqlite3 /mnt/vaultwarden/db.sqlite3 ".backup '/tmp/db.sqlite3'" && gzip /tmp/db.sqlite3then send the file to your storage node or object storage (the cron gets that node’s variables when linked). Use Read-only when the job only reads; Read-write lets it change the app’s files and can corrupt a running database.