[{"data":1,"prerenderedAt":174},["ShallowReactive",2],{"doc:concepts\u002Ffiles-and-backups":3},{"title":4,"description":5,"url":6,"markdownPath":7,"file":8,"section":9,"sectionTitle":10,"html":11,"toc":12,"navigation":33,"previous":172,"next":173},"Files and backups","Where an L4 Server stores messages and files, what a Backup contains and leaves out, and why backups live apart from live storage.","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups.md","docs\u002Fconcepts\u002Ffiles-and-backups.md","concepts","Concepts","\u003Cp>A Server keeps its data in its own storage. A Backup is a recovery copy kept somewhere else. It is not a second running Server.\u003C\u002Fp>\n\u003Ch2 id=\"where-data-lives\">\u003Ca class=\"heading-anchor\" href=\"#where-data-lives\">Where data lives\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Data\u003C\u002Fth>\n\u003Cth>On Cloudflare\u003C\u002Fth>\n\u003Cth>On a VPS (celld)\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Messages, Accounts, Roles, Tasks, Mail records, settings\u003C\u002Ftd>\n\u003Ctd>The Server&#39;s D1 database\u003C\u002Ftd>\n\u003Ctd>celld&#39;s D1, stored in the private RustFS bucket\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Files and attachments, raw email\u003C\u002Ftd>\n\u003Ctd>The Server&#39;s private R2 files bucket, or Basic KV storage\u003C\u002Ftd>\n\u003Ctd>The same RustFS bucket\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Live state (presence, typing, active calls)\u003C\u002Ftd>\n\u003Ctd>Durable Objects\u003C\u002Ftd>\n\u003Ctd>celld Durable Objects\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Backups\u003C\u002Ftd>\n\u003Ctd>A separate backups bucket, or a download\u003C\u002Ftd>\n\u003Ctd>Archives outside the live volumes\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Every file read goes through the Server&#39;s normal authorization. Files are never served from a public bucket.\u003C\u002Fp>\n\u003Ch3 id=\"basic-kv-storage-on-cloudflare\">\u003Ca class=\"heading-anchor\" href=\"#basic-kv-storage-on-cloudflare\">Basic KV storage on Cloudflare\u003C\u002Fa>\u003C\u002Fh3>\n\u003Cp>A Cloudflare Server can run without R2. File payloads are then stored in the Server&#39;s existing KV namespace, with a limit of 20 MiB per file and 500 MiB in total. Cloudflare&#39;s own KV limits and daily quotas still apply.\u003C\u002Fp>\n\u003Cp>To move to R2, open \u003Cstrong>Server settings → Storage\u003C\u002Fstrong>, choose \u003Cstrong>Connect R2\u003C\u002Fstrong>, then \u003Cstrong>Move files to R2\u003C\u002Fstrong>. The copy runs in resumable batches and checks every file&#39;s hash. Uploads pause while it runs; reading continues. The original KV copies are kept.\u003C\u002Fp>\n\u003Cp>If a Server has no file storage at all, uploads and full backups fail with &quot;File storage is unavailable. Ask the Server operator to configure storage.&quot;\u003C\u002Fp>\n\u003Ch2 id=\"what-a-backup-contains\">\u003Ca class=\"heading-anchor\" href=\"#what-a-backup-contains\">What a Backup contains\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The Server&#39;s own backup (\u003Cstrong>Server settings → Deployment → Backups\u003C\u002Fstrong>) is a TAR archive with:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>A logical export of the D1 database: messages, authentication records, Roles and all other Server data.\u003C\u002Fli>\n\u003Cli>The live files (R2 objects, or KV file payloads on Basic storage).\u003C\u002Fli>\n\u003Cli>A summary of table, row, object and byte counts.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>It does \u003Cstrong>not\u003C\u002Fstrong> contain:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Environment secrets, including \u003Ccode>AUTH_SECRET\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Live Durable Object state.\u003C\u002Fli>\n\u003Cli>KV connection tickets.\u003C\u002Fli>\n\u003Cli>Data held by external providers, such as RealtimeKit.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cblockquote class=\"callout callout-important\">\u003Cp class=\"callout-title\">Important\u003C\u002Fp>\u003Cp>Keep the original \u003Ccode>AUTH_SECRET\u003C\u002Fcode> (and any provider secrets) safe and separate from the archive. Stored credentials, such as model provider keys, backup keys and the Server&#39;s push notification identity, are encrypted with it. A restore with a different secret cannot decrypt them.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"where-backups-go\">\u003Ca class=\"heading-anchor\" href=\"#where-backups-go\">Where Backups go\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>On Cloudflare, the installer creates a separate backups bucket next to the files bucket. If it exists, the Server writes a backup there every week, and before every update. Without one, Settings downloads the archive to your computer. You can also save S3 credentials for a separate destination of your own; use a private bucket that is not the files bucket L4 already uses.\u003C\u002Fp>\n\u003Cp>On a VPS, \u003Ccode>llll backup\u003C\u002Fcode> archives the whole installation, including \u003Ccode>.env\u003C\u002Fcode> and all volumes. On Docker Compose or Coolify you stop the stack and archive the volumes yourself. See \u003Ca href=\"\u002Fdocs\u002Fself-host\u002Fvps#backups\">VPS\u003C\u002Fa> and \u003Ca href=\"\u002Fdocs\u002Fself-host\u002Fdocker#back-up-and-restore\">Docker Compose\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>\u003Cfigure class=\"doc-shot doc-shot-missing\">\u003Cdiv class=\"doc-shot-frame\" role=\"img\" aria-label=\"Server settings → Deployment → Backups with the Download backup button and the archive scope note\">\u003Cspan class=\"doc-shot-label\">Screenshot coming soon\u003C\u002Fspan>\u003Cspan class=\"doc-shot-alt\">Server settings → Deployment → Backups with the Download backup button and the archive scope note\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cfigcaption>Backups in Deployment settings\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003C\u002Fp>\n\u003Ch2 id=\"backups-stay-separate\">\u003Ca class=\"heading-anchor\" href=\"#backups-stay-separate\">Backups stay separate\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Backups are never stored in the live files bucket. Otherwise later archives could include earlier ones, and one bucket failure could remove both the files and their backups.\u003C\u002Fli>\n\u003Cli>Removing a Server never deletes its backup bucket or backup archives.\u003C\u002Fli>\n\u003Cli>Restoring a backup brings back the same Server UUID, Accounts, Roles, messages and files.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Updates make a verified backup first. See \u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Freleases-and-updates\">Releases and updates\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"related\">\u003Ca class=\"heading-anchor\" href=\"#related\">Related\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Fbackups\">Backups on Cloudflare\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Fremove-a-server\">Remove a Server\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",[13,17,21,24,27,30],{"id":14,"text":15,"depth":16},"where-data-lives","Where data lives",2,{"id":18,"text":19,"depth":20},"basic-kv-storage-on-cloudflare","Basic KV storage on Cloudflare",3,{"id":22,"text":23,"depth":16},"what-a-backup-contains","What a Backup contains",{"id":25,"text":26,"depth":16},"where-backups-go","Where Backups go",{"id":28,"text":29,"depth":16},"backups-stay-separate","Backups stay separate",{"id":31,"text":32,"depth":16},"related","Related",[34,59,87,103,118,140,162],{"id":35,"title":36,"pages":37},"get-started","Get started",[38,41,44,47,50,53,56],{"title":39,"url":40},"What is L4","\u002Fdocs\u002Fget-started\u002Fwhat-is-l4",{"title":42,"url":43},"Choose how to run your Server","\u002Fdocs\u002Fget-started\u002Fchoose-how-to-run",{"title":45,"url":46},"Create a Server on Cloudflare","\u002Fdocs\u002Fget-started\u002Fcreate-on-cloudflare",{"title":48,"url":49},"Install on a VPS","\u002Fdocs\u002Fget-started\u002Finstall-on-a-vps",{"title":51,"url":52},"Connect to a Server","\u002Fdocs\u002Fget-started\u002Fconnect-a-server",{"title":54,"url":55},"Invite your team","\u002Fdocs\u002Fget-started\u002Finvite-your-team",{"title":57,"url":58},"Create your first Agent","\u002Fdocs\u002Fget-started\u002Ffirst-agent",{"id":60,"title":61,"pages":62},"cloudflare","Cloudflare",[63,66,69,72,75,78,81,84],{"title":64,"url":65},"L4 on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Foverview",{"title":67,"url":68},"Cloudflare access","\u002Fdocs\u002Fcloudflare\u002Faccess",{"title":70,"url":71},"Costs and limits","\u002Fdocs\u002Fcloudflare\u002Fcosts-and-limits",{"title":73,"url":74},"Custom domain","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain",{"title":76,"url":77},"Mail on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fmail",{"title":79,"url":80},"Update a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fupdates",{"title":82,"url":83},"Backups on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fbackups",{"title":85,"url":86},"Remove a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fremove-a-server",{"id":88,"title":89,"pages":90},"self-host","Self-host",[91,94,97,100],{"title":92,"url":93},"Run a Server on a VPS","\u002Fdocs\u002Fself-host\u002Fvps",{"title":95,"url":96},"Run a Server with Docker Compose","\u002Fdocs\u002Fself-host\u002Fdocker",{"title":98,"url":99},"Run a Server on Coolify","\u002Fdocs\u002Fself-host\u002Fcoolify",{"title":101,"url":102},"Compute Nodes","\u002Fdocs\u002Fself-host\u002Fcompute-nodes",{"id":9,"title":10,"pages":104},[105,108,111,114,115],{"title":106,"url":107},"Servers and the Shell","\u002Fdocs\u002Fconcepts\u002Fserver-and-shell",{"title":109,"url":110},"Accounts, Members and Roles","\u002Fdocs\u002Fconcepts\u002Faccounts-members-roles",{"title":112,"url":113},"Agents, Tasks and Runs","\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs",{"title":4,"url":6},{"title":116,"url":117},"Releases and updates","\u002Fdocs\u002Fconcepts\u002Freleases-and-updates",{"id":119,"title":120,"pages":121},"agents","Agents and MCP",[122,125,128,131,134,137],{"title":123,"url":124},"Agents overview","\u002Fdocs\u002Fagents\u002Foverview",{"title":126,"url":127},"Models and Providers","\u002Fdocs\u002Fagents\u002Fmodels-and-providers",{"title":129,"url":130},"Connect an MCP client","\u002Fdocs\u002Fagents\u002Fmcp",{"title":132,"url":133},"External agents","\u002Fdocs\u002Fagents\u002Fexternal-agents",{"title":135,"url":136},"Repositories and code work","\u002Fdocs\u002Fagents\u002Frepositories",{"title":138,"url":139},"Schedules","\u002Fdocs\u002Fagents\u002Fschedules",{"id":141,"title":142,"pages":143},"guides","Guides",[144,147,150,153,156,159],{"title":145,"url":146},"Chat","\u002Fdocs\u002Fguides\u002Fchat",{"title":148,"url":149},"Projects and Tasks","\u002Fdocs\u002Fguides\u002Fprojects-and-tasks",{"title":151,"url":152},"Mail","\u002Fdocs\u002Fguides\u002Fmail",{"title":154,"url":155},"Calls and Live","\u002Fdocs\u002Fguides\u002Fcalls",{"title":157,"url":158},"Notifications","\u002Fdocs\u002Fguides\u002Fnotifications",{"title":160,"url":161},"Telegram","\u002Fdocs\u002Fguides\u002Ftelegram",{"id":163,"title":164,"pages":165},"reference","Reference",[166,169],{"title":167,"url":168},"Glossary","\u002Fdocs\u002Freference\u002Fglossary",{"title":170,"url":171},"Troubleshooting","\u002Fdocs\u002Freference\u002Ftroubleshooting",{"title":112,"url":113},{"title":116,"url":117},1793335826081]