"use strict";(globalThis.webpackChunktripdocs=globalThis.webpackChunktripdocs||[]).push([[582],{5475:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"misc/backup","title":"Backup and Restore","description":"Backup and Restore your data","source":"@site/docs/misc/backup.md","sourceDirName":"misc","slug":"/misc/backup","permalink":"/trip/docs/misc/backup","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"description":"Backup and Restore your data"},"sidebar":"docSidebar","previous":{"title":"Miscelaneous","permalink":"/trip/docs/category/miscelaneous"},"next":{"title":"Installing on Synology NAS","permalink":"/trip/docs/misc/synology"}}');var s=t(4848),o=t(8453);const i={sidebar_position:1,description:"Backup and Restore your data"},a="Backup and Restore",c={},d=[{value:"Backup",id:"backup",level:2},{value:"Restore",id:"restore",level:2}];function l(e){const n={admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"backup-and-restore",children:"Backup and Restore"})}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsx)(n.p,{children:"This procedure assumes you know the storage directory path or have not modified it from the default"})}),"\n",(0,s.jsx)(n.admonition,{type:"danger",children:(0,s.jsxs)(n.p,{children:["Modify what is between ",(0,s.jsx)(n.code,{children:"< >"})]})}),"\n",(0,s.jsxs)(n.p,{children:["TRIP stores data in the ",(0,s.jsx)(n.code,{children:"storage"})," directory by default, including a SQLite database and related folders."]}),"\n",(0,s.jsx)(n.h2,{id:"backup",children:"Backup"}),"\n",(0,s.jsx)(n.p,{children:"To back up your data, follow these simple steps:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Stop the container"})}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Look for TRIP container\n$ docker ps\n\n$ docker stop \n"})}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Create a backup archive of the storage directory"})}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"zip -r _TRIP_backup.zip \n"})}),"\n",(0,s.jsxs)(n.ol,{start:"3",children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Restart the container"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"restore",children:"Restore"}),"\n",(0,s.jsx)(n.admonition,{type:"danger",children:(0,s.jsx)(n.p,{children:"Ensure the container is not running before restoring"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Extract the backup archive to the storage directory"})}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"$ unzip _TRIP_backup.zip -d \n"})}),"\n",(0,s.jsxs)(n.ol,{start:"2",children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Start the container"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,o.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:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);