[{"data":1,"prerenderedAt":318},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fapplications\u002Fdestroy":3},{"id":4,"title":5,"body":6,"description":310,"extension":311,"meta":312,"navigation":313,"path":314,"seo":315,"stem":316,"__hash__":317},"docs\u002Fdocs\u002Fapplications\u002Fdestroy.md","Destroy and data safety",{"type":7,"value":8,"toc":302},"minimark",[9,13,25,30,61,69,75,81,121,125,176,183,186,192,201,205,267,285,289,298],[10,11,5],"h1",{"id":12},"destroy-and-data-safety",[14,15,16,20,21,24],"p",{},[17,18,19],"code",{},"sg application destroy"," removes the instances and volumes ",[17,22,23],{},"sg"," recorded as its own. Read the plan before you say yes, because volumes hold your data.",[26,27,29],"h2",{"id":28},"destroy","Destroy",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes github-dark-high-contrast","sg application destroy --config application.yaml\n","bash","",[17,38,39],{"__ignoreMap":36},[40,41,44,47,51,54,58],"span",{"class":42,"line":43},"line",1,[40,45,23],{"class":46},"s_sBn",[40,48,50],{"class":49},"sTRMh"," application",[40,52,53],{"class":49}," destroy",[40,55,57],{"class":56},"sCcAr"," --config",[40,59,60],{"class":49}," application.yaml\n",[31,62,67],{"className":63,"code":65,"language":66,"meta":36},[64],"language-text","Destroy 4 owned application change(s) from hello? [y\u002FN]:\n","text",[17,68,65],{"__ignoreMap":36},[14,70,71,72,74],{},"Anything in the cluster that ",[17,73,23],{}," can't prove it created is left alone and printed:",[31,76,79],{"className":77,"code":78,"language":66,"meta":36},[64],"retained: instance scratch-box is not owned by sg\n",[17,80,78],{"__ignoreMap":36},[82,83,84,97],"table",{},[85,86,87],"thead",{},[88,89,90,94],"tr",{},[91,92,93],"th",{},"Flag",[91,95,96],{},"Does",[98,99,100,111],"tbody",{},[88,101,102,108],{},[103,104,105],"td",{},[17,106,107],{},"--yes",[103,109,110],{},"Destroy the prepared plan without asking",[88,112,113,118],{},[103,114,115],{},[17,116,117],{},"--force-volume-share \u003Cvolume>",[103,119,120],{},"Approve a same-member shared volume, the same as on deploy",[26,122,124],{"id":123},"what-destroy-keeps","What destroy keeps",[82,126,127,137],{},[85,128,129],{},[88,130,131,134],{},[91,132,133],{},"Removed",[91,135,136],{},"Kept",[98,138,139,150,162,169],{},[88,140,141,144],{},[103,142,143],{},"Owned instances",[103,145,146,147,149],{},"Anything ",[17,148,23],{}," didn't create",[88,151,152,159],{},[103,153,154,155],{},"Owned volumes ",[156,157,158],"strong",{},"and the data on them",[103,160,161],{},"The application's registration (name, cluster, spec path)",[88,163,164,166],{},[103,165],{},[103,167,168],{},"Its generation history",[88,170,171,173],{},[103,172],{},[103,174,175],{},"Data-volume safety markers",[14,177,178,179,182],{},"There's no separate \"unregister\" step. The name stays bound to that spec file and cluster, so ",[17,180,181],{},"init"," with the same name and a different file refuses. Pick a new name for a new app.",[26,184,175],{"id":185},"data-volume-safety-markers",[14,187,188,189,191],{},"The first time a volume holds service data, ",[17,190,23],{}," writes a permanent marker for it in the ledger: application, member, pool and volume. The marker survives taking the service out of the spec, and survives destroy.",[14,193,194,195,197,198,200],{},"A marker never proves the volume exists, that ",[17,196,23],{}," owns it, or that it may be deleted. It makes ",[17,199,23],{}," treat that volume with suspicion forever. Volumes that held data before markers existed weren't backfilled.",[26,202,204],{"id":203},"refusals-that-protect-you","Refusals that protect you",[82,206,207,220],{},[85,208,209],{},[88,210,211,214,217],{},[91,212,213],{},"Refusal",[91,215,216],{},"Means",[91,218,219],{},"What to do",[98,221,222,238,254],{},[88,223,224,229,232],{},[103,225,226],{},[17,227,228],{},"sg:volume-share-unsafe",[103,230,231],{},"Sharing a volume on one member wasn't approved",[103,233,234,235,237],{},"Pass ",[17,236,117],{}," if you mean it",[88,239,240,245,248],{},[103,241,242],{},[17,243,244],{},"sg:service-data-on-root",[103,246,247],{},"Service data appears to be on an instance's root disk",[103,249,250,253],{},[17,251,252],{},"--confirm-root-data \u003Cinstance>"," allows only a restart that keeps the root disk",[88,255,256,261,264],{},[103,257,258],{},[17,259,260],{},"sg:application-destroy-unsafe",[103,262,263],{},"The spec changes a volume's content type or shrinks it",[103,265,266],{},"Volumes never shrink and never change type; restore the spec",[268,269,271],"note",{"kind":270},"warning",[14,272,273,274,277,278,281,282,284],{},"Back up databases yourself before destroy, or before any deploy whose plan shows a ",[17,275,276],{},"services.*"," or ",[17,279,280],{},"volumes.*"," row you didn't expect. ",[17,283,23],{}," protects ownership, not backups.",[26,286,288],{"id":287},"taking-everything-down","Taking everything down",[14,290,291,292,297],{},"Destroying an application leaves the cluster and machines in place. To go further, see ",[293,294,296],"a",{"href":295},"\u002Fdocs\u002Fmachines\u002Fclusters#taking-a-cluster-apart","Form a cluster: taking a cluster apart",".",[299,300,301],"style",{},"html pre.shiki code .s_sBn, html code.shiki .s_sBn{--shiki-default:#FFB757}html pre.shiki code .sTRMh, html code.shiki .sTRMh{--shiki-default:#ADDCFF}html pre.shiki code .sCcAr, html code.shiki .sCcAr{--shiki-default:#91CBFF}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);}",{"title":36,"searchDepth":303,"depth":303,"links":304},2,[305,306,307,308,309],{"id":28,"depth":303,"text":29},{"id":123,"depth":303,"text":124},{"id":185,"depth":303,"text":175},{"id":203,"depth":303,"text":204},{"id":287,"depth":303,"text":288},"What sg application destroy deletes and keeps, the safety markers that outlive it, and the refusals that protect your data.","md",{},true,"\u002Fdocs\u002Fapplications\u002Fdestroy",{"title":5,"description":310},"docs\u002Fapplications\u002Fdestroy","d3tO1oDasz7UY7iE_jdv0E7FOBQKNpB4M3dd02iXhYs",1796464240885]