<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":1937257,"date":"2021-07-02T20:28:00","date_gmt":"2021-07-02T18:28:00","guid":{"rendered":"http:\/\/nhub.news\/?p=1937257"},"modified":"2021-07-02T23:03:31","modified_gmt":"2021-07-02T21:03:31","slug":"recover-from-a-disaster-using-a-userfile-backup","status":"publish","type":"post","link":"http:\/\/nhub.news\/ru\/2021\/07\/recover-from-a-disaster-using-a-userfile-backup\/","title":{"rendered":"Recover From a Disaster Using a userfile Backup"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>See a workaround to quickly validate whether someone can recover from a complete teardown of a cluster without using object storage.<\/b><br \/>\nJoin the DZone community and get the full member experience. CockroachDB supports enterprise-grade backup and restores using object storage targets. For local development, a userfile scheme was introduced to allow fast prototyping without a heavy burden of spinning up costly infra. A customer requested the ability to quickly validate whether they can recover from a complete teardown of a cluster without using object storage. This is my experience and current workaround to get this to work. This tutorial takes a short detour compared to my other articles due to a specific requirement that we need to recover from a local disaster into a new cluster. userfile is very helpful but it assumes the cluster is up and restore can proceed as intended. However, when you intend to shut down the source cluster, remove all of the underlying storage along with the user space where userfile stores its backups, userfile stops being useful. In that case, we have to download the backups out of the user space prior to shutting down the cluster and removing the data volumes. Our engineering team acknowledges the gaps in userfile upload and they advised me there is work in progress to address the issue. There is a PR out to make userfile upload recursive and it will be coming in the next release. In the meantime, here&#8217;s a handy script to automate the upload and admittedly, it can be improved to handle more error logic but I am a bit in a hurry here. Then restoring the table into a new cluster will look like so Published at DZone with permission of Artem Ervits. See the original article here. Opinions expressed by DZone contributors are their own.<\/p>\n<script>jQuery(function(){jQuery(\".vc_icon_element-icon\").css(\"top\", \"0px\");});<\/script><script>jQuery(function(){jQuery(\"#td_post_ranks\").css(\"height\", \"10px\");});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>See a workaround to quickly validate whether someone can recover from a complete teardown of a cluster without using object storage. Join the DZone community and get the full member experience. CockroachDB supports enterprise-grade backup and restores using object storage targets. For local development, a userfile scheme was introduced to allow fast prototyping without a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1937256,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[93],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1937257"}],"collection":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/comments?post=1937257"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1937257\/revisions"}],"predecessor-version":[{"id":1937258,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1937257\/revisions\/1937258"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media\/1937256"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media?parent=1937257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/categories?post=1937257"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/tags?post=1937257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}