{"id":2764,"date":"2022-12-20T15:17:13","date_gmt":"2022-12-20T18:17:13","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/btrfsimage-man8\/"},"modified":"2022-12-20T15:17:13","modified_gmt":"2022-12-20T18:17:13","slug":"btrfsimage-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/btrfsimage-man8\/","title":{"rendered":"BTRFS&minus;IMAGE (man8)"},"content":{"rendered":"<h1 align=\"center\">BTRFS\u2212IMAGE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXIT STATUS\">EXIT STATUS<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">btrfs-image \u2212 create\/restore an image of the filesystem<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs\u2212image<\/b> [options] <i><source><target><\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>btrfs\u2212image<\/b><\/i> is used to create an image of a btrfs filesystem. All data will be zeroed, but metadata and the like is preserved. Mainly used for debugging purposes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In the dump mode, source is the btrfs device\/file and target is the output file (use <i>\u2212<\/i> for stdout).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In the restore mode (option \u2212r), source is the dumped image and target is the btrfs device\/file.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212r<\/p>\n<p style=\"margin-left:17%;\">Restore metadump image. By default, this fixes super\u2019s chunk tree, by using 1 stripe pointing to primary device, so that file system can be restored by running tree log reply if possible. To restore without changing number of stripes in chunk tree check \u2212o option.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212c <i><value><\/i><\/p>\n<p style=\"margin-left:17%;\">Compression level (0 ~ 9).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212t <i><value><\/i><\/p>\n<p style=\"margin-left:17%;\">Number of threads (1 ~ 32) to be used to process the image dump or restore.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212o<\/p>\n<p style=\"margin-left:17%;\">Use the old restore method, this does not fixup the chunk tree so the restored file system will not be able to be mounted.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212s<\/p>\n<p style=\"margin-left:17%;\">Sanitize the file names when generating the image. One \u2212s means just generate random garbage, which means that the directory indexes won\u2019t match up since the hashes won\u2019t match with the garbage filenames. Using \u2212ss will calculate a collision for the filename so that the hashes match, and if it can\u2019t calculate a collision then it will just generate garbage. The collision calculator is very time and CPU intensive so only use it if you are having problems with your file system tree and need to have it mostly working.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212w<\/p>\n<p style=\"margin-left:17%;\">Walk all the trees manually and copy any blocks that are referenced. Use this option if your extent tree is corrupted to make sure that all of the metadata is captured.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\u2212m<\/p>\n<p style=\"margin-left:17%;\">Restore for multiple devices, more than 1 device should be provided.<\/p>\n<h2>EXIT STATUS <a name=\"EXIT STATUS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>btrfs\u2212image<\/b> will return 0 if no error happened. If any problems happened, 1 will be returned.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>mkfs.btrfs<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  btrfs-image \u2212 create\/restore an image of the filesystem <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,118,4],"class_list":["post-2764","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-btrfs-image","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=2764"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/2764\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=2764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=2764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=2764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}