{"id":407,"date":"2013-07-17T15:15:45","date_gmt":"2013-07-17T22:15:45","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=407"},"modified":"2013-07-17T15:15:45","modified_gmt":"2013-07-17T22:15:45","slug":"using-unix-tar-for-data-moves","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/using-unix-tar-for-data-moves\/","title":{"rendered":"Using Unix TAR for data moves"},"content":{"rendered":"

I haven't tried this yet in a real world example. In some instances you might be moving large amounts of data and network is not an option (speed), you might have incompatible file systems so you can't just re-use disk (LUN), and more traditional backup devices like tapes are not available.<\/p>\n

Tar to raw disk is one option.<\/p>\n

Tar without using multiple volumes:<\/strong><\/span><\/p>\n

\r\n$ md5sum \/media\/sf_DATA\/isos\/V36284-01.iso\r\naeb36d1f087a1fbf5e62723d2f7e0b9e  \/media\/sf_DATA\/isos\/V36284-01.iso\r\n\r\n# tar cpf \/dev\/sdb \/media\/sf_DATA\/isos\/V36284-01.iso\r\ntar: Removing leading `\/' from member names\r\n\r\n# tar tvf \/dev\/sdb\r\n-rwxrwx--- root\/vboxsf 252258304 2013-05-01 10:43 media\/sf_DATA\/isos\/V36284-01.iso\r\n\r\n# tar rpf \/dev\/sdb \/media\/sf_DATA\/isos\/FreeBSD-Live.iso\r\ntar: Removing leading `\/' from member names\r\n\r\n# tar tvf \/dev\/sdb\r\n-rwxrwx--- root\/vboxsf 252258304 2013-05-01 10:43 media\/sf_DATA\/isos\/V36284-01.iso\r\n-rwxrwx--- root\/vboxsf 179044352 2013-05-14 23:10 media\/sf_DATA\/isos\/FreeBSD-Live.iso\r\n\r\n# md5sum media\/sf_DATA\/isos\/V36284-01.iso\r\naeb36d1f087a1fbf5e62723d2f7e0b9e  media\/sf_DATA\/isos\/V36284-01.iso\r\n<\/pre>\n

Tar with using multiple volumes:<\/strong><\/span><\/p>\n

\r\n# tar -cMf \/dev\/sdb V36284-01.iso fd11src.iso\r\nPrepare volume #2 for `\/dev\/sdb' and hit return: n \/dev\/sdc\r\nPrepare volume #3 for `\/dev\/sdc' and hit return: n \/dev\/sdd\r\n\r\n# tar -tvMf \/dev\/sdb\r\n-rwxrwx--- root\/vboxsf 252258304 2013-05-01 10:43 V36284-01.iso\r\nPrepare volume #2 for `\/dev\/sdb' and hit return: n \/dev\/sdc\r\nPrepare volume #3 for `\/dev\/sdc' and hit return: n \/dev\/sdd\r\n-rwxrwx--- root\/vboxsf  40828928 2013-04-22 07:50 fd11src.iso\r\n\r\n# tar -xvMf \/dev\/sdb\r\nV36284-01.iso\r\nPrepare volume #2 for `\/dev\/sdb' and hit return: n \/dev\/sdc\r\nPrepare volume #3 for `\/dev\/sdc' and hit return: n \/dev\/sdd\r\nfd11src.iso\r\n\r\n# ls -lh V36284-01.iso fd11src.iso\r\n-rwxrwx--- 1 root vboxsf  39M Apr 22 07:50 fd11src.iso\r\n-rwxrwx--- 1 root vboxsf 241M May  1 10:43 V36284-01.iso\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

I haven’t tried this yet in a real world example. In some instances you might be moving large amounts of<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-407","post","type-post","status-publish","format-standard","hentry","category-backups"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=407"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/407\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}