{"id":43,"date":"2018-07-09T15:54:55","date_gmt":"2018-07-09T15:54:55","guid":{"rendered":"https:\/\/www.huerter.me\/?p=43"},"modified":"2018-07-09T20:34:05","modified_gmt":"2018-07-09T20:34:05","slug":"backups-mit-tar-und-verschiedene-kompressionen","status":"publish","type":"post","link":"https:\/\/www.huerter.me\/index.php\/2018\/07\/09\/backups-mit-tar-und-verschiedene-kompressionen\/","title":{"rendered":"Backups mit tar und verschiedene Kompressionen (Benchmark)"},"content":{"rendered":"<p>F\u00fcr meine Datensicherung nutze ich &#8222;<strong>tar<\/strong>&#8222;, eines der meist genutzten Programme zum erstellen von Archiven. Dank der weiten Verbreitung ist das Tool zumeist mit den meisten Distributionen vorinstalliert.Per Default ist es aber recht langsam und nutzt nicht wirklich die Leistung des Systems. Grund hierf\u00fcr ist die fehlende Multithreading Unterst\u00fctzung.<\/p>\n<p>&nbsp;<\/p>\n<p>Im konkreten m\u00f6chte ich einen Samba Share innerhalb einer KVM-VM sichern. In diesem sind alle m\u00f6glichen Arten von Dateien (Programme, Datenbanken, Scripte, PDFs, TXTs, Videos, &#8230;) vorhanden.<\/p>\n<p>Die vorhandenen\u00a0<strong>22 GB<\/strong> Daten verteilen sich auf rund <strong>90.000 Dateien<\/strong>. F\u00fcr die Erstellung des Archivs stehen innerhalb der VM 1GB RAM sowie 2 virtuelle CPU Cores zur Verf\u00fcgung vom KVM Hostsystem (Intel Xeon CPU E3-1240L v5 @ 2.10GHz, 16 GB DDR4 ECC 2133MHz, RAID1 \u00fcber\u00a0WD20EFRX-68EUZN0) bereit.<\/p>\n<p>Top 15 Dateitypen zur Veranschaulichung:<\/p>\n<pre class=\"lang:addlightplain\">root@catelyn:<strong>\/storage_data\/folder# find . -type f | sed -n 's\/..*\\.\/\/p' | sort | uniq -c | sort -nr | head -n 15<\/strong>\r\n  27511 jpg\r\n  11864 php\r\n  11345 png\r\n  10867 html\r\n   4623 gif\r\n   4472 js\r\n   2321 pdf\r\n   1697 css\r\n   1382 bmp\r\n   1337 ini\r\n   1307 JPG\r\n   1278 xml\r\n   1258 txt\r\n    855 docx\r\n    771 htm<\/pre>\n<p>Die Tools k\u00f6nnen alle mittels des jeweiligen Paketmanagers (yum, apt etc.) installiert werden.<\/p>\n<p>&nbsp;<\/p>\n<table style=\"width: 765px; border-style: dotted;\" border=\"1\" width=\"765\">\n<tbody>\n<tr>\n<td style=\"width: 92px;\" width=\"93\"><strong>Typ<\/strong><\/td>\n<td style=\"width: 289px;\" width=\"314\"><strong>Befehl<\/strong><\/td>\n<td style=\"width: 93px;\" width=\"80\"><strong>Zeit<\/strong><\/td>\n<td style=\"width: 123px;\" width=\"93\"><strong>Gr\u00f6\u00dfe in MB<\/strong><\/td>\n<td style=\"width: 168px;\" width=\"95\"><strong>Kompression<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">null<\/td>\n<td style=\"width: 289px;\">Reine Ordner\/Dateigr\u00f6\u00dfe<\/td>\n<td style=\"width: 93px;\">0<\/td>\n<td style=\"width: 123px;\">21949<\/td>\n<td style=\"width: 168px;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">tar<\/td>\n<td style=\"width: 289px;\">tar cf backup_plain.tar ..\/folder<\/td>\n<td style=\"width: 93px;\">7m22.590s<\/td>\n<td style=\"width: 123px;\">21736<\/td>\n<td style=\"width: 168px;\">0,97%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">tar compress<\/td>\n<td style=\"width: 289px;\">tar czf backup_compress.tar.gz ..\/folder\/<\/td>\n<td style=\"width: 93px;\">16m8.776s<\/td>\n<td style=\"width: 123px;\">18387<\/td>\n<td style=\"width: 168px;\">16,23%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">pigz<\/td>\n<td style=\"width: 289px;\">tar -I pigz -cf backup_pigz.tar.gz ..\/folder\/<\/td>\n<td style=\"width: 93px;\">9m43.084s<\/td>\n<td style=\"width: 123px;\">18392<\/td>\n<td style=\"width: 168px;\">16,21%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">pbzip2<\/td>\n<td style=\"width: 289px;\">tar -I pbzip2 -cf backup_pbzip2.tar.bz2 ..\/folder\/<\/td>\n<td style=\"width: 93px;\">28m33.028s<\/td>\n<td style=\"width: 123px;\">17898<\/td>\n<td style=\"width: 168px;\">18,46%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">pxz<\/td>\n<td style=\"width: 289px;\">tar -I pxz -cf backup_pxz.tar.xz ..\/folder\/<\/td>\n<td style=\"width: 93px;\">82m30.024s<\/td>\n<td style=\"width: 123px;\">17325<\/td>\n<td style=\"width: 168px;\">21,07%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 92px;\">zip<\/td>\n<td style=\"width: 289px;\">zip -r backup ..\/folder\/*<\/td>\n<td style=\"width: 93px;\">17m16.504s<\/td>\n<td style=\"width: 123px;\">18464<\/td>\n<td style=\"width: 168px;\">15,88%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Meine pers\u00f6nliche Wahl f\u00e4llt auf pigz, da hier Kompression und Rechenzeit in einem guten Verh\u00e4ltnis stehen.<\/p>\n<p>&nbsp;<\/p>\n<p>Wenn reine Dokumente gesichert werden, w\u00fcrde ich den Test nochmals wiederholen. Der durchgef\u00fchrte Test bezieht sich auf viele verschiedene Dateitypen welche teilweise bereits komprimiert waren.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>F\u00fcr meine Datensicherung nutze ich &#8222;tar&#8222;, eines der meist genutzten Programme zum erstellen von Archiven. Dank der weiten Verbreitung ist das Tool zumeist mit den meisten Distributionen vorinstalliert.Per Default ist es aber recht langsam und nutzt nicht wirklich die Leistung des Systems. Grund hierf\u00fcr ist die fehlende Multithreading Unterst\u00fctzung. &nbsp; Im konkreten m\u00f6chte ich einen [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":48,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[7,6,5,12,11,13,9,4,8],"class_list":["post-43","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-archive","tag-compress","tag-linux","tag-pbzip2","tag-pigz","tag-pxz","tag-rar","tag-tar","tag-zip"],"_links":{"self":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/comments?post=43"}],"version-history":[{"count":6,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/43\/revisions"}],"predecessor-version":[{"id":54,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/posts\/43\/revisions\/54"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/media\/48"}],"wp:attachment":[{"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/media?parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/categories?post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.huerter.me\/index.php\/wp-json\/wp\/v2\/tags?post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}