[{"data":1,"prerenderedAt":173},["ShallowReactive",2],{"doc:cloudflare\u002Fbackups":3},{"title":4,"description":5,"url":6,"markdownPath":7,"file":8,"section":9,"sectionTitle":10,"html":11,"toc":12,"navigation":32,"previous":171,"next":172},"Backups on Cloudflare","How a Cloudflare L4 Server backs up its database and files, where backups are kept, and how to make one yourself.","\u002Fdocs\u002Fcloudflare\u002Fbackups","\u002Fdocs\u002Fcloudflare\u002Fbackups.md","docs\u002Fcloudflare\u002Fbackups.md","cloudflare","Cloudflare","\u003Cp>A Backup is a recovery copy of your Server, stored separately from its live files. It is not a second running Server. L4 never deletes backup buckets together with a Server.\u003C\u002Fp>\n\u003Ch2 id=\"automatic-backups\">\u003Ca class=\"heading-anchor\" href=\"#automatic-backups\">Automatic backups\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When R2 is enabled, the installer creates a separate backups bucket named \u003Ccode>llll-&lt;uuid&gt;-backups\u003C\u002Fcode>, next to the files bucket \u003Ccode>llll-&lt;uuid&gt;-files\u003C\u002Fcode>. The Server then writes a backup there:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>every week\u003C\u002Fstrong>, from its weekly cron trigger;\u003C\u002Fli>\n\u003Cli>\u003Cstrong>before every update\u003C\u002Fstrong>, verified before the new release is uploaded. See \u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Fupdates\">Updates\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Archives are stored under \u003Ccode>servers\u002F&lt;uuid&gt;\u002F\u003C\u002Fcode> in the bucket, named by the time they were made. L4 does not delete old archives. Prune them yourself in the Cloudflare dashboard when you no longer need them, and keep at least one recent one.\u003C\u002Fp>\n\u003Cp>In \u003Cstrong>Server settings → Deployment → Backups\u003C\u002Fstrong>, this bucket appears as \u003Cstrong>Separate backup bucket provided by this deployment\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Cp>A Server with basic file storage has no backups bucket and makes no automatic backups. Download backups yourself, or connect R2 in \u003Cstrong>Server settings → Storage\u003C\u002Fstrong>.\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>Each backup is a TAR archive with:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>a logical export of the D1 database: Accounts, Members, Roles, messages, settings and the rest of the Server&#39;s data;\u003C\u002Fli>\n\u003Cli>every stored file, from R2 or from basic KV storage.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>It does \u003Cstrong>not\u003C\u002Fstrong> contain:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Worker 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>Settings saved on the Server, such as provider keys and kept Cloudflare access, are encrypted with \u003Ccode>AUTH_SECRET\u003C\u002Fcode>, which is not in the archive. The installer generates it as a secret on the Server&#39;s Worker, and Cloudflare does not display secret values. Data restored without the original secret cannot decrypt those settings; they must be entered again.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"download-a-backup\">\u003Ca class=\"heading-anchor\" href=\"#download-a-backup\">Download a backup\u003C\u002Fa>\u003C\u002Fh2>\n\u003Col>\n\u003Cli>Open \u003Cstrong>Server settings → Deployment → Backups\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Under \u003Cstrong>Download to this device\u003C\u002Fstrong>, select \u003Cstrong>Download backup\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>The Worker reads the database and every stored file while the download runs. This can take a long time. Keep the tab open, and keep the Server idle until the download finishes.\u003C\u002Fp>\n\u003Ch2 id=\"save-a-backup-to-another-bucket\">\u003Ca class=\"heading-anchor\" href=\"#save-a-backup-to-another-bucket\">Save a backup to another bucket\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>You can also send backups to any S3-compatible service: Cloudflare R2, AWS S3, Backblaze B2, Wasabi, MinIO and others.\u003C\u002Fp>\n\u003Col>\n\u003Cli>Open \u003Cstrong>Server settings → Deployment → Backups\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Under \u003Cstrong>Save to S3-compatible bucket\u003C\u002Fstrong>, enter the \u003Cstrong>Endpoint\u003C\u002Fstrong>, \u003Cstrong>Region\u003C\u002Fstrong> (use \u003Ccode>auto\u003C\u002Fcode> for Cloudflare R2), \u003Cstrong>Bucket\u003C\u002Fstrong>, optional \u003Cstrong>Prefix\u003C\u002Fstrong>, \u003Cstrong>Access Key ID\u003C\u002Fstrong> and \u003Cstrong>Secret Access Key\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Test connection\u003C\u002Fstrong>, then \u003Cstrong>Save credentials\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Backup to bucket\u003C\u002Fstrong>. Keep the tab open; large Servers can take several minutes.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cfigure class=\"doc-shot doc-shot-missing\">\u003Cdiv class=\"doc-shot-frame\" role=\"img\" aria-label=\"The Backups settings with Download to this device and Save to S3-compatible bucket sections, the Endpoint, Region, Bucket, Prefix and key fields, and the Backup to bucket button\">\u003Cspan class=\"doc-shot-label\">Screenshot coming soon\u003C\u002Fspan>\u003Cspan class=\"doc-shot-alt\">The Backups settings with Download to this device and Save to S3-compatible bucket sections, the Endpoint, Region, Bucket, Prefix and key fields, and the Backup to bucket button\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cfigcaption>Server settings → Deployment → Backups\u003C\u002Ffigcaption>\u003C\u002Ffigure>\u003C\u002Fp>\n\u003Cblockquote class=\"callout callout-warning\">\u003Cp class=\"callout-title\">Warning\u003C\u002Fp>\u003Cp>Use a separate private bucket. Do not use the R2 bucket already bound to L4 for live files. Otherwise later archives can include earlier backups, and one bucket failure can remove both the files and their backups.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>A bucket chosen here is for manual backups. It does not replace the backups bucket used by updates.\u003C\u002Fp>\n\u003Ch2 id=\"backups-and-removal\">\u003Ca class=\"heading-anchor\" href=\"#backups-and-removal\">Backups and removal\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Backups are never deleted with a Server. When you \u003Ca href=\"\u002Fdocs\u002Fcloudflare\u002Fremove-a-server\">remove a Server\u003C\u002Fa>, keep its backups bucket and any downloaded archives until you are sure you no longer need them.\u003C\u002Fp>\n\u003Ch2 id=\"restoring\">\u003Ca class=\"heading-anchor\" href=\"#restoring\">Restoring\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Restore means bringing the Server&#39;s data back into new, isolated resources and checking that the same UUID, Accounts, Roles, messages and files are there. There is no restore button in Settings, and updates never roll data back automatically. If you might need to recover a Server, keep its archives and do not delete its original Worker, which holds \u003Ccode>AUTH_SECRET\u003C\u002Fcode>. See \u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups\">Files and backups\u003C\u002Fa>.\u003C\u002Fp>\n",[13,17,20,23,26,29],{"id":14,"text":15,"depth":16},"automatic-backups","Automatic backups",2,{"id":18,"text":19,"depth":16},"what-a-backup-contains","What a backup contains",{"id":21,"text":22,"depth":16},"download-a-backup","Download a backup",{"id":24,"text":25,"depth":16},"save-a-backup-to-another-bucket","Save a backup to another bucket",{"id":27,"text":28,"depth":16},"backups-and-removal","Backups and removal",{"id":30,"text":31,"depth":16},"restoring","Restoring",[33,58,82,98,117,139,161],{"id":34,"title":35,"pages":36},"get-started","Get started",[37,40,43,46,49,52,55],{"title":38,"url":39},"What is L4","\u002Fdocs\u002Fget-started\u002Fwhat-is-l4",{"title":41,"url":42},"Choose how to run your Server","\u002Fdocs\u002Fget-started\u002Fchoose-how-to-run",{"title":44,"url":45},"Create a Server on Cloudflare","\u002Fdocs\u002Fget-started\u002Fcreate-on-cloudflare",{"title":47,"url":48},"Install on a VPS","\u002Fdocs\u002Fget-started\u002Finstall-on-a-vps",{"title":50,"url":51},"Connect to a Server","\u002Fdocs\u002Fget-started\u002Fconnect-a-server",{"title":53,"url":54},"Invite your team","\u002Fdocs\u002Fget-started\u002Finvite-your-team",{"title":56,"url":57},"Create your first Agent","\u002Fdocs\u002Fget-started\u002Ffirst-agent",{"id":9,"title":10,"pages":59},[60,63,66,69,72,75,78,79],{"title":61,"url":62},"L4 on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Foverview",{"title":64,"url":65},"Cloudflare access","\u002Fdocs\u002Fcloudflare\u002Faccess",{"title":67,"url":68},"Costs and limits","\u002Fdocs\u002Fcloudflare\u002Fcosts-and-limits",{"title":70,"url":71},"Custom domain","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain",{"title":73,"url":74},"Mail on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fmail",{"title":76,"url":77},"Update a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fupdates",{"title":4,"url":6},{"title":80,"url":81},"Remove a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fremove-a-server",{"id":83,"title":84,"pages":85},"self-host","Self-host",[86,89,92,95],{"title":87,"url":88},"Run a Server on a VPS","\u002Fdocs\u002Fself-host\u002Fvps",{"title":90,"url":91},"Run a Server with Docker Compose","\u002Fdocs\u002Fself-host\u002Fdocker",{"title":93,"url":94},"Run a Server on Coolify","\u002Fdocs\u002Fself-host\u002Fcoolify",{"title":96,"url":97},"Compute Nodes","\u002Fdocs\u002Fself-host\u002Fcompute-nodes",{"id":99,"title":100,"pages":101},"concepts","Concepts",[102,105,108,111,114],{"title":103,"url":104},"Servers and the Shell","\u002Fdocs\u002Fconcepts\u002Fserver-and-shell",{"title":106,"url":107},"Accounts, Members and Roles","\u002Fdocs\u002Fconcepts\u002Faccounts-members-roles",{"title":109,"url":110},"Agents, Tasks and Runs","\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs",{"title":112,"url":113},"Files and backups","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups",{"title":115,"url":116},"Releases and updates","\u002Fdocs\u002Fconcepts\u002Freleases-and-updates",{"id":118,"title":119,"pages":120},"agents","Agents and MCP",[121,124,127,130,133,136],{"title":122,"url":123},"Agents overview","\u002Fdocs\u002Fagents\u002Foverview",{"title":125,"url":126},"Models and Providers","\u002Fdocs\u002Fagents\u002Fmodels-and-providers",{"title":128,"url":129},"Connect an MCP client","\u002Fdocs\u002Fagents\u002Fmcp",{"title":131,"url":132},"External agents","\u002Fdocs\u002Fagents\u002Fexternal-agents",{"title":134,"url":135},"Repositories and code work","\u002Fdocs\u002Fagents\u002Frepositories",{"title":137,"url":138},"Schedules","\u002Fdocs\u002Fagents\u002Fschedules",{"id":140,"title":141,"pages":142},"guides","Guides",[143,146,149,152,155,158],{"title":144,"url":145},"Chat","\u002Fdocs\u002Fguides\u002Fchat",{"title":147,"url":148},"Projects and Tasks","\u002Fdocs\u002Fguides\u002Fprojects-and-tasks",{"title":150,"url":151},"Mail","\u002Fdocs\u002Fguides\u002Fmail",{"title":153,"url":154},"Calls and Live","\u002Fdocs\u002Fguides\u002Fcalls",{"title":156,"url":157},"Notifications","\u002Fdocs\u002Fguides\u002Fnotifications",{"title":159,"url":160},"Telegram","\u002Fdocs\u002Fguides\u002Ftelegram",{"id":162,"title":163,"pages":164},"reference","Reference",[165,168],{"title":166,"url":167},"Glossary","\u002Fdocs\u002Freference\u002Fglossary",{"title":169,"url":170},"Troubleshooting","\u002Fdocs\u002Freference\u002Ftroubleshooting",{"title":76,"url":77},{"title":80,"url":81},1793304298195]