{"id":12437,"date":"2016-04-15T09:59:12","date_gmt":"2016-04-15T07:59:12","guid":{"rendered":"http:\/\/www.kodingtech.com\/?p=1741"},"modified":"2016-04-15T09:59:12","modified_gmt":"2016-04-15T07:59:12","slug":"and-wiped-out-the-entire-company-with-a-single-code-mistake","status":"publish","type":"post","link":"https:\/\/kodingtech.com\/en\/si-a-sters-toata-compania-cu-o-singura-greseala-de-cod\/","title":{"rendered":"He wiped out his entire business with a code mistake"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">This story comes just in time to prove once again how important a good backup is. What is it about? <\/span><\/p>\n<p><span class=\"s1\">A hosting provider named Marco Marsala accidentally deleted everything he had stored on his servers \u2013 both his own data and his clients&#039; websites. <\/span><br \/>\n<span class=\"s1\">The problem has become <a href=\"http:\/\/www.telegraph.co.uk\/technology\/2016\/04\/14\/man-deletes-his-whole-company-after-typing-wrong-bit-of-code\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">public<\/a> after Marsala sought advice on a forum for server experts, where he wrote that he had run destructive code that erased his data. <\/span><br \/>\n<span class=\"s1\">Responses received: &quot;\u201e<span style=\"color: #ff6600;\"><strong><em>You went out of business.<\/em><\/strong><\/span>\u201d&quot; &quot;\u201e<em><strong><span style=\"color: #ff6600;\">You don&#039;t need technical advice, you need a lawyer.<\/span><\/strong><\/em>\u201d&quot;\u201d<br \/>\n<\/span><\/p>\n<h5 class=\"p1\"><\/h5>\n<h5 class=\"p1\" style=\"text-align: center;\"><span class=\"s1\">The disaster was caused by the command &quot;\u201e<a href=\"http:\/\/www.linuxdevcenter.com\/cmd\/cmd.csp?path=r\/rm\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">rm -rf<\/a>\u201e&quot;:\u00a0 <\/span><\/h5>\n<h5 class=\"p1\" style=\"text-align: center;\"><span class=\"s1\">\u201c<span style=\"color: #ff6600;\">rm<\/span>\u201d asks the computer to delete files. <\/span><\/h5>\n<h5 class=\"p1\" style=\"text-align: center;\"><span class=\"s1\">\u201e&quot;\u201e<span style=\"color: #ff6600;\">r<\/span>\u201d&quot;deletes everything in a specific folder.&quot;. <\/span><\/h5>\n<h5 class=\"p1\" style=\"text-align: center;\"><span class=\"s1\">\u201e&quot;\u201e<span style=\"color: #ff6600;\">f<\/span>\u201d&quot; means &quot;forced deletion&quot;, i.e. ignoring the usual warnings in such situations. <\/span><\/h5>\n<p><span class=\"s1\">Normally, the code above deletes everything it finds in certain parts of the computer, but in this case the command was not directed to a specific area of data, so it deleted everything it found on the computer. Including backups, which are on the same computer.<\/span><\/p>\n<h3 style=\"text-align: center;\">How do we avoid situations like this?<\/h3>\n<p style=\"padding-left: 30px; text-align: right;\"><span style=\"color: #ff6600;\"><strong>Double backup.<\/strong><\/span> Store your data on two different disks. If you lose one, you still have the other. The probability of losing both at the same time is too small, it would mean being particularly unlucky.<\/p>\n<p style=\"padding-left: 30px; text-align: right;\"><strong><span style=\"color: #ff6600;\">Backup in separate places.<\/span> <\/strong>The two disks should be in different places. Don&#039;t keep them in the same drawer or on the same server, because you can spill coffee\/beer\/juice right there. Not to mention fire, lightning, or meteorites.<\/p>\n<p style=\"padding-left: 30px; text-align: right;\"><strong><span style=\"color: #ff6600;\">Offline backup.<\/span> <\/strong>Make sure that at least one of the backup disks is offline. This way, no commands like <em>rm -rf<\/em> He can&#039;t reach him, no matter how he calls you.<\/p>\n<h3 style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1742\" src=\"https:\/\/www.kodingtech.com\/wp-content\/uploads\/rmrf.png\" alt=\"penguin t-shirt pun programmer \" width=\"457\" height=\"445\" \/><\/h3>\n<p style=\"text-align: right;\"><span style=\"color: #808080;\">Header photo: <a style=\"color: #808080;\" href=\"http:\/\/www.laughandpee.com\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Ryan McGuire<\/a> <a style=\"color: #808080;\" href=\"http:\/\/www.gratisography.com\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">via.<\/a><\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Povestea asta vine la fix ca s\u0103 dovedeasc\u0103 \u00eenc\u0103 o dat\u0103 c\u00e2t de important este backup-ul bine f\u0103cut. Despre ce este vorba ? Un furnizor de hosting pe nume Marco Marsala a \u0219ters din gre\u0219eal\u0103 tot ce avea stocat pe servere &#8211; at\u00e2t datele proprii c\u00e2t \u0219i site-urile clien\u021bilor s\u0103i. Problema a devenit public\u0103 dup\u0103 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_breakdance_hide_in_design_set":false,"_breakdance_tags":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-12437","post","type-post","status-publish","format-standard","hentry","category-servicii-it"],"_links":{"self":[{"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/posts\/12437","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/comments?post=12437"}],"version-history":[{"count":0,"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/posts\/12437\/revisions"}],"wp:attachment":[{"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/media?parent=12437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/categories?post=12437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kodingtech.com\/en\/wp-json\/wp\/v2\/tags?post=12437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}