{"id":990,"date":"2020-11-02T17:27:29","date_gmt":"2020-11-02T15:27:29","guid":{"rendered":"https:\/\/www.rocworks.at\/wordpress\/?p=990"},"modified":"2020-11-18T09:28:54","modified_gmt":"2020-11-18T07:28:54","slug":"mount-disk-image-on-linux","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=990","title":{"rendered":"Mount Disk Image on Linux"},"content":{"rendered":"\n<p>If you have created a backup of a disk with dd:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dd if=\/dev\/sdb of=image.img bs=4096<\/pre>\n\n\n\n<p>then you can create loop back devices with partitions:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">losetup -f -P .\/image.img&nbsp;\nlosetup -a<\/pre>\n\n\n\n<p>then you can mount partition:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount \/dev\/loop0p1 \/mnt\/disk<\/code><\/pre>\n\n\n\n<p>Another hint: Copy files with tar so that permissions and users are persevered:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar cf - . | (cd \/destination; tar xvf -)\n\ntar cf - . | ssh root@server2 \"tar xf - -C \/destination\/\"<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have created a backup of a disk with dd: dd if=\/dev\/sdb of=image.img bs=4096 then you can create loop back devices with partitions: losetup -f -P .\/image.img&nbsp; losetup -a then you can mount partition: Another hint: Copy files with tar so that permissions and users are persevered: tar cf &#8211; . | (cd \/destination; &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=990\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mount Disk Image on Linux<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-990","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=990"}],"version-history":[{"count":3,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/990\/revisions"}],"predecessor-version":[{"id":1001,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/990\/revisions\/1001"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}