1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["138"],{81598(e,n,t){t.r(n),t.d(n,{metadata:()=>s,default:()=>h,frontMatter:()=>i,contentTitle:()=>a,toc:()=>c,assets:()=>l});var s=JSON.parse('{"id":"commands/kv/rollback","title":"kv rollback","description":"The \\"kv rollback\\" command restores a given previous version to the current\\nversion at the given path.","source":"@site/versioned_docs/version-2.7.x/commands/kv/rollback.mdx","sourceDirName":"commands/kv","slug":"/commands/kv/rollback","permalink":"/docs/commands/kv/rollback","draft":false,"unlisted":false,"editUrl":"https://github.com/openbao/openbao/blob/release/2.7.x/website/content/docs/commands/kv/rollback.mdx","tags":[],"version":"2.7.x","frontMatter":{"sidebar_label":"rollback","description":"The \\"kv rollback\\" command restores a given previous version to the current\\nversion at the given path."},"sidebar":"docs","previous":{"title":"put","permalink":"/docs/commands/kv/put"},"next":{"title":"undelete","permalink":"/docs/commands/kv/undelete"}}'),o=t(94686),r=t(44812);let i={sidebar_label:"rollback",description:'The "kv rollback" command restores a given previous version to the current\nversion at the given path.'},a="kv rollback",l={},c=[{value:"Examples",id:"examples",level:2},{value:"Usage",id:"usage",level:2},{value:"Output options",id:"output-options",level:3},{value:"Command options",id:"command-options",level:3}];function d(e){let n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"kv-rollback",children:"kv rollback"})}),"\n",(0,o.jsx)(n.admonition,{type:"warning",children:(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"NOTE:"})," This is a ",(0,o.jsx)(n.a,{href:"/docs/secrets/kv/kv-v2",children:"K/V Version 2"})," secrets\nengine command, and not available for Version 1."]})}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"kv rollback"})," command restores a given previous version to the current\nversion at the given path. The value is written as a new version; for instance,\nif the current version is 5 and the rollback version is 2, the data from version\n2 will become version 6. This command makes it easy to restore unintentionally\noverwritten data."]}),"\n",(0,o.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,o.jsx)(n.p,{children:'Restores the version 2 of the data at key "creds":'}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-shell-session",children:"$ bao kv rollback -mount=secret -version=2 creds\nKey Value\n--- -----\ncreated_time 2019-06-06T17:07:19.299831Z\ndeletion_time n/a\ndestroyed false\nversion 6\n"})}),"\n",(0,o.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,o.jsxs)(n.p,{children:["There are no flags beyond the ",(0,o.jsx)(n.a,{href:"/docs/commands/",children:"standard set of flags"}),"\nincluded on all commands."]}),"\n",(0,o.jsx)(n.h3,{id:"output-options",children:"Output options"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"-format"})," ",(0,o.jsx)(n.code,{children:'(string: "table")'}),' - Print the output in the given format. Valid\nformats are "table", "json", or "yaml". This can also be specified via the\n',(0,o.jsx)(n.code,{children:"BAO_FORMAT"})," environment variable."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"command-options",children:"Command options"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"-mount"})," ",(0,o.jsx)(n.code,{children:'(string: "")'})," - Specifies the path where the KV backend is mounted.\nIf specified, the next argument will be interpreted as the secret path. If\nthis flag is not specified, the next argument will be interpreted as the\ncombined mount path and secret path, with /data/ automatically inserted for\nKV v2 secrets."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"-version"})," ",(0,o.jsx)(n.code,{children:"(int: 0)"})," - Specifies the version number that should be made\ncurrent again."]}),"\n"]}),"\n"]})]})}function h(e={}){let{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},44812(e,n,t){t.d(n,{R:()=>i,x:()=>a});var s=t(92990);let o={},r=s.createContext(o);function i(e){let n=s.useContext(r);return s.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(o):e.components||o:i(e.components),s.createElement(r.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.