[{"data":1,"prerenderedAt":214},["ShallowReactive",2],{"selaras-docs-navigation":3,"selaras-docs:\u002Fdeploy\u002Fbackup":82},[4,26,43,65],{"title":5,"order":6,"icon":7,"collapse":8,"navBadges":7,"path":9,"stem":10,"children":11,"page":8},"Guide",1,null,false,"\u002Fguide","guide",[12,16,21],{"title":13,"path":14,"stem":15,"order":6,"icon":7,"collapse":8,"navBadges":7},"Getting started","\u002Fguide\u002Fgetting-started","guide\u002Fgetting-started",{"title":17,"path":18,"stem":19,"order":20,"icon":7,"collapse":8,"navBadges":7},"Connect an agent","\u002Fguide\u002Fconnect-an-agent","guide\u002Fconnect-an-agent",2,{"title":22,"path":23,"stem":24,"order":25,"icon":7,"collapse":8,"navBadges":7},"Organize and share","\u002Fguide\u002Fworkspace","guide\u002Fworkspace",3,{"title":27,"order":20,"icon":7,"collapse":8,"navBadges":7,"path":28,"stem":29,"children":30,"page":8},"Authoring","\u002Fauthoring","authoring",[31,35,39],{"title":32,"path":33,"stem":34,"order":6,"icon":7,"collapse":8,"navBadges":7},"Overview","\u002Fauthoring\u002Foverview","authoring\u002Foverview",{"title":36,"path":37,"stem":38,"order":20,"icon":7,"collapse":8,"navBadges":7},"Markdown","\u002Fauthoring\u002Fmarkdown","authoring\u002Fmarkdown",{"title":40,"path":41,"stem":42,"order":25,"icon":7,"collapse":8,"navBadges":7},"HTML and bundles","\u002Fauthoring\u002Fhtml","authoring\u002Fhtml",{"title":44,"order":25,"icon":7,"collapse":8,"navBadges":7,"path":45,"stem":46,"children":47,"page":8},"Deploy","\u002Fdeploy","deploy",[48,52,56,60],{"title":49,"path":50,"stem":51,"order":6,"icon":7,"collapse":8,"navBadges":7},"Docker","\u002Fdeploy\u002Fdocker","deploy\u002Fdocker",{"title":53,"path":54,"stem":55,"order":20,"icon":7,"collapse":8,"navBadges":7},"Cloudflare Workers","\u002Fdeploy\u002Fcloudflare","deploy\u002Fcloudflare",{"title":57,"path":58,"stem":59,"order":25,"icon":7,"collapse":8,"navBadges":7},"Turso and Vercel","\u002Fdeploy\u002Fturso","deploy\u002Fturso",{"title":61,"path":62,"stem":63,"order":64,"icon":7,"collapse":8,"navBadges":7},"Backup and restore","\u002Fdeploy\u002Fbackup","deploy\u002Fbackup",4,{"title":66,"order":64,"icon":7,"collapse":8,"navBadges":7,"path":67,"stem":68,"children":69,"page":8},"Reference","\u002Freference","reference",[70,74,78],{"title":71,"path":72,"stem":73,"order":6,"icon":7,"collapse":8,"navBadges":7},"MCP","\u002Freference\u002Fmcp","reference\u002Fmcp",{"title":75,"path":76,"stem":77,"order":20,"icon":7,"collapse":8,"navBadges":7},"REST API","\u002Freference\u002Frest-api","reference\u002Frest-api",{"title":79,"path":80,"stem":81,"order":25,"icon":7,"collapse":8,"navBadges":7},"Configuration","\u002Freference\u002Fconfiguration","reference\u002Fconfiguration",{"id":83,"title":61,"aside":84,"body":85,"collapse":8,"description":209,"editLink":84,"extension":210,"icon":7,"issueLink":84,"meta":211,"navBadges":7,"navigation":7,"order":64,"path":62,"prevNext":84,"seo":212,"stem":63,"toc":84,"__hash__":213},"docs\u002Fdeploy\u002Fbackup.md",true,{"type":86,"value":87,"toc":204},"minimark",[88,92,109,114,129,144,153,157,172,175,179,197,200],[89,90,61],"h1",{"id":91},"backup-and-restore",[93,94,95,96,100,101,104,105,108],"p",{},"Back up the database and the object store together, and keep the secrets\n(",[97,98,99],"code",{},"JWT_SECRET",", ",[97,102,103],{},"SHARE_SECRET",", and on Workers ",[97,106,107],{},"NUXT_APP_SECRET",") stable.\nRotating them signs everyone out and invalidates existing unlisted links.",[110,111,113],"h2",{"id":112},"docker-and-sqlite","Docker and SQLite",[93,115,116,117,120,121,124,125,128],{},"Everything lives under ",[97,118,119],{},"\u002Fdata",": ",[97,122,123],{},"serangkai.db"," plus the ",[97,126,127],{},"files\u002F"," object store.\nStop the container and copy the volume, or take a hot SQLite backup:",[130,131,136],"pre",{"className":132,"code":133,"language":134,"meta":135,"style":135},"language-sh shiki shiki-themes github-light github-dark","sqlite3 \u002Fdata\u002Fserangkai.db \".backup '\u002Fbackup\u002Fserangkai.db'\"\n","sh","",[97,137,138],{"__ignoreMap":135},[139,140,142],"span",{"class":141,"line":6},"line",[139,143,133],{},[93,145,146,147,149,150,152],{},"Copy ",[97,148,127],{}," alongside it. To restore, mount the same ",[97,151,119],{}," volume.",[110,154,156],{"id":155},"cloudflare-d1","Cloudflare D1",[130,158,160],{"className":132,"code":159,"language":134,"meta":135,"style":135},"wrangler d1 export \u003Cdatabase> --output backup.sql\nwrangler d1 execute \u003Cdatabase> --file backup.sql\n",[97,161,162,167],{"__ignoreMap":135},[139,163,164],{"class":141,"line":6},[139,165,166],{},"wrangler d1 export \u003Cdatabase> --output backup.sql\n",[139,168,169],{"class":141,"line":20},[139,170,171],{},"wrangler d1 execute \u003Cdatabase> --file backup.sql\n",[93,173,174],{},"D1 Time Travel also offers point-in-time recovery.",[110,176,178],{"id":177},"object-storage","Object storage",[93,180,181,182,185,186,189,190,193,194,196],{},"Sync R2 with ",[97,183,184],{},"wrangler r2 object"," commands or ",[97,187,188],{},"rclone sync",", and Backblaze B2\nwith ",[97,191,192],{},"b2 sync"," or ",[97,195,188],{}," against its S3 endpoint. Keep buckets private:\nrangka bytes are meaningless without the matching database rows.",[93,198,199],{},"A restore is consistent only when the database and object store come from the\nsame point in time and the secrets match the ones in use when the backup was\ntaken.",[201,202,203],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":135,"searchDepth":25,"depth":25,"links":205},[206,207,208],{"id":112,"depth":20,"text":113},{"id":155,"depth":20,"text":156},{"id":177,"depth":20,"text":178},"Back up the database, files, and secrets together.","md",{},{"title":61,"description":209},"3PrngzJkv2aybXAYBgMe6osXmcAxN6vgxTz1cMP9zDA",1795580564390]