{"id":153,"date":"2016-01-29T20:22:58","date_gmt":"2016-01-29T19:22:58","guid":{"rendered":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=153"},"modified":"2016-11-27T00:49:36","modified_gmt":"2016-11-26T23:49:36","slug":"restore-files-from-obnam","status":"publish","type":"post","link":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=153","title":{"rendered":"Restore files from obnam"},"content":{"rendered":"<p>Well, well, well&#8230; Seems I just fucked up:<\/p>\n<ol>\n<li>\u00a0I should have remembered that tc can only control\u00a0<em>outoging<\/em> traffic. So changing \/etc\/network-scripts\/tc.sh for\u00a0<em>incoming<\/em> rates was just stupid.<\/li>\n<li>I wrote\u00a0the file to disk without keeping the original, working lines commented out.<\/li>\n<li>I didn&#8217;t\u00a0remember the proper bandwidth values.<\/li>\n<\/ol>\n<p>Fortunately, I keep an obnam-backup. To recover files from\u00a0e.g. \/etc, do the following:<\/p>\n<pre># mount \/dev\/mapper\/obnam-c \/mnt\/backup-obnam\/\r\n# obnam restore --to=\/tmp\/restore\\\r\n --config=\/home\/am\/.config\/obnam\/etc.conf<\/pre>\n<p>That restores all of \/etc to \/tmp\/restore. Add a file or directory the end to only restore that file or directory, or leave out &#8211;to to restore in place.<\/p>\n<p><strong>Do not forget to umount \/mnt\/backup-obnam afterwards!<\/strong><\/p>\n<p>Another thing: If obnam complains about locking errors, do the following:<\/p>\n<pre># mount \/dev\/mapper\/obnam-c \/mnt\/backup-obnam\/\r\n# cd .config\/obnam\r\n# for i in *.conf ; do obnam force-lock --config $i ; echo $i ; done<\/pre>\n<p>Shit gebeurt \ud83d\ude41<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, well, well&#8230; Seems I just fucked up: \u00a0I should have remembered that tc can only control\u00a0outoging traffic. So changing \/etc\/network-scripts\/tc.sh for\u00a0incoming rates was just stupid. I wrote\u00a0the file to disk without keeping the original, working lines commented out. I didn&#8217;t\u00a0remember the proper bandwidth values. Fortunately, I keep an obnam-backup. To recover files from\u00a0e.g. \/etc, &hellip; <a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=153\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Restore files from obnam<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[50,49],"class_list":["post-153","post","type-post","status-publish","format-standard","hentry","category-linux","tag-backup","tag-obnam"],"_links":{"self":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=153"}],"version-history":[{"count":4,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/153\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}