PageSourceSearch

https://www.developers.thinkfree.com/docs/assets/js/58862b29.44d648f4.js

js thinkfree.com collected 2026-10-02 03:29:50 UTC 9,012 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkthinkfree_developers_docs=self.webpackChunkthinkfree_developers_docs||[]).push([[1821],{7888(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"office/storage-lifecycle","title":"Data persistence and backup","description":"Keep documents and settings when replacing the Office container, and learn how to back up and restore data.","source":"@site/docs/office/storage-lifecycle.md","sourceDirName":"office","slug":"/office/data-persistence-and-backup/","permalink":"/docs/office/data-persistence-and-backup/","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"title":"Data persistence and backup","sidebar_label":"Data persistence and backup","sidebar_position":3,"description":"Keep documents and settings when replacing the Office container, and learn how to back up and restore data.","slug":"/office/data-persistence-and-backup/"},"sidebar":"docsSidebar","previous":{"title":"Create document URLs","permalink":"/docs/office/document-urls"},"next":{"title":"Admin console and operations","permalink":"/docs/office/admin-operations"}}');var s=t(4848),i=t(8453);const o={title:"Data persistence and backup",sidebar_label:"Data persistence and backup",sidebar_position:3,description:"Keep documents and settings when replacing the Office container, and learn how to back up and restore data.",slug:"/office/data-persistence-and-backup/"},r="Data persistence and backup",d={},c=[{value:"Keep data outside the container",id:"keep-data-outside-the-container",level:2},{value:"Run with document, data, and log folders mounted",id:"run-with-document-data-and-log-folders-mounted",level:3},{value:"Back up data and verify recovery",id:"back-up-data-and-verify-recovery",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"data-persistence-and-backup",children:"Data persistence and backup"})}),"\n",(0,s.jsx)(n.p,{children:"The default run commands store database and document files inside the container. Deleting an Office container also deletes documents and settings stored only inside it. Store data you need to retain in folders on the server, and prepare separate backups for failures."}),"\n",(0,s.jsx)(n.h2,{id:"keep-data-outside-the-container",children:"Keep data outside the container"}),"\n",(0,s.jsxs)(n.p,{children:["You can ",(0,s.jsx)(n.strong,{children:"mount"})," folders on the server at the container's data paths. The databases continue to run inside the container, while their data files are stored in the server folders. When creating a new container, reconnect the existing data folders to resume using Office with your previous documents and settings."]}),"\n",(0,s.jsx)(n.p,{children:"To retain admin settings and editing data as well as original documents, you must preserve the following folders together."}),"\n",(0,s.jsx)("div",{className:"office-storage-data",children:(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Data to retain"}),(0,s.jsx)(n.th,{children:"Folder inside the container"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Original documents and saved files in the default Host Storage"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"/home/thinkfree/docs"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Admin settings, adapter information, documents being edited, and GridFS resources such as images"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"/home/thinkfree/mongodb/data"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Persisted session and cache data"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"/home/thinkfree/redis/data"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Runtime logs for troubleshooting"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"/home/thinkfree/weboffice/logs"})})]})]})]})}),"\n",(0,s.jsx)(n.h3,{id:"run-with-document-data-and-log-folders-mounted",children:"Run with document, data, and log folders mounted"}),"\n",(0,s.jsxs)(n.p,{children:["The following Linux example uses an image with a Trial license included for non-commercial evaluation. Run it on a server where port ",(0,s.jsx)(n.code,{children:"8080"})," is available."]}),"\n",(0,s.jsxs)(n.p,{children:["First create document, database, cache, and log folders under your current working directory. Set the
1ir ownership so the container's runtime user (UID and GID ",(0,s.jsx)(n.code,{children:"1000"}),") can write to them."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'mkdir -p office-data/documents office-data/mongodb office-data/redis office-data/logs\nsudo chown -R 1000:1000 office-data\n\ndocker run --name thinkfree-office-persistent --stop-timeout 60 \\\n  -p 8080:8070 \\\n  -v "$PWD/office-data/documents:/home/thinkfree/docs" \\\n  -v "$PWD/office-data/mongodb:/home/thinkfree/mongodb/data" \\\n  -v "$PWD/office-data/redis:/home/thinkfree/redis/data" \\\n  -v "$PWD/office-data/logs:/home/thinkfree/weboffice/logs" \\\n  thinkfree/office-single-node-trial:latest\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"$PWD"})," is the current working directory. Place documents to use in Office in ",(0,s.jsx)(n.code,{children:"office-data/documents"}),".\nThe image includes sample documents in ",(0,s.jsx)(n.code,{children:"/home/thinkfree/docs"})," by default. When you mount a host folder at this path, you can open and edit the documents stored in that folder instead of the samples."]}),"\n",(0,s.jsxs)(n.p,{children:["Admin settings and editing data are stored in ",(0,s.jsx)(n.code,{children:"office-data/mongodb"}),", persisted session and cache data in ",(0,s.jsx)(n.code,{children:"office-data/redis"}),", and runtime logs in ",(0,s.jsx)(n.code,{children:"office-data/logs"}),". Document filter logs are available in ",(0,s.jsx)(n.code,{children:"office-data/logs/hncLog"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.a,{href:"http://localhost:8080/cloud-office/",children:"Office Admin"})," on the server to check its status and settings. From another computer, replace ",(0,s.jsx)(n.code,{children:"localhost"})," with the server address. When using the Free Commercial image, also include the ",(0,s.jsx)(n.a,{href:"/docs/office/set-up-office/#request-a-free-commercial-license",children:"license file mount option"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"If you use S3, WebDAV, or HTTP Storage, you must establish and manage a separate backup policy for the external storage that holds your original documents."}),"\n",(0,s.jsx)(n.p,{children:"When replacing the container, shut down the existing container gracefully, then reconnect the same server folders."}),"\n",(0,s.jsx)(n.h2,{id:"back-up-data-and-verify-recovery",children:"Back up data and verify recovery"}),"\n",(0,s.jsx)(n.p,{children:"Mounting folders retains data across container replacement, but does not automatically create backups against file deletion or server failure. You must store backups separately and establish and operate a backup policy for your environment."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Stop new document work, save documents being edited, and shut down Office gracefully."}),"\n",(0,s.jsx)(n.li,{children:"Back up document storage, databases, and cache at a consistent point in time. For external storage, also stop changes to that storage or obtain a snapshot from the same point in time."}),"\n",(0,s.jsx)(n.li,{children:"Restore the backup in a separate environment and check admin settings and adapter connections."}),"\n",(0,s.jsx)(n.li,{children:"Open a restored document, edit it, save it, and reopen it to verify recovery."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/office/admin-operations",children:"Admin console and operations"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/docs/office/production",children:"Production checklist"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,t){t.d(n,{R:()=>o,x:()=>r});var a=t(6540);const s={},i=a.createContext(s);function o(e){const n=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.