{"id":932,"date":"2023-09-03T19:28:42","date_gmt":"2023-09-03T17:28:42","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=932"},"modified":"2023-09-03T19:28:43","modified_gmt":"2023-09-03T17:28:43","slug":"apt-clone-software-zwischen-debian-rechnern-abgleichen","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/03\/apt-clone-software-zwischen-debian-rechnern-abgleichen\/","title":{"rendered":"apt-clone &#8211; Software zwischen Debian-Rechnern abgleichen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Man hat hier einen Rechner stehen, einen dort &#8211; auf allen l\u00e4uft Debian oder eine darauf basierende Linux-Distribution und man will auf allen Rechnern dieselbe Software. Man kann sich nun Paket f\u00fcr Paket selbst manuell installieren, auf jedem Rechner hier und da &#8211; professionell Nutzer w\u00fcrden sich Skripte oder Befehle basteln, um an die passende Paket-Liste zu kommen &#8211; etwa (als\u00a0root\u00a0am\u00a0Terminal):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dpkg -l | awk '\/^ii\/ { print $2 }' | egrep -v \"lib|dev|x-headers|x-image\" &gt; Paket-Liste.txt<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1024x576.jpg\" alt=\"\" class=\"wp-image-933\" style=\"width:700px;height:394px\" width=\"700\" height=\"394\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone.jpg 1920w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Aber ganz ehrlich, warum &#8211; wenn es doch auch einfach geht? Um die Software zwischen auf Debian basierenden Systemen abzugleichen, dient die Software &#8222;<em>apt-clone<\/em>&#8222;.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">apt-clone installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sie installieren diese Software ganz einfach \u00fcber die\u00a0Paket-Verwaltung\u00a0durch das Paket &#8222;<strong>apt-clone<\/strong>&#8222;. Die Software muss zur Nutzung nat\u00fcrlich auf allen Systemen installiert sein.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">apt-clone nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Zu Beginn sollte man nat\u00fcrlich das System reinigen &#8211; dies geschieht auf allen Rechnern, die Software macht keinen Unterschied zwischen ben\u00f6tigten Debian-Paketen und nicht mehr ben\u00f6tigten Abh\u00e4ngigkeiten. Also &#8211; als Administrator am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt autoremove<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt wollen wir erst einmal eine Paket-Liste erstellen, auch hier nat\u00fcrlich als Administrator am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-clone clone .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Hiermit wird im aktuellen Verzeichnis ein komprimiertes Archiv angelegt, es nennt sich &#8222;<strong>apt-clone-state-RECHNERNAME.tar.gz<\/strong>&#8220; und beinhaltet alle nicht manuell installierten Pakete &#8211; besser gelingt also der Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-clone clone --with-dpkg-repack .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die Ausf\u00fchrung dieses Befehls dauert etwas l\u00e4nger &#8211; daf\u00fcr beinhaltet es nicht nur die Paket-Listen, sondern auch die Pakete, die Sie nicht \u00fcber die Repositorys der Distribution installiert haben. Etwa ein Paket, das Sie von einer Webseite heruntergeladen und installiert haben &#8211; das komprimierte Archiv wird dadurch nat\u00fcrlich auch etwas gr\u00f6\u00dfer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1-1024x576.jpg\" alt=\"\" class=\"wp-image-934\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-1.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Die Software f\u00fcgt nat\u00fcrlich auch die entsprechenden Sources.list-Dateien ein. Jetzt k\u00f6nnen Sie sich mit der Option &#8222;<strong>info archiv.tar.gz<\/strong>&#8220; Informationen anzeigen lassen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2-1024x576.jpg\" alt=\"\" class=\"wp-image-935\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/apt-clone-2.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Auf dem anderen Rechner k\u00f6nnen wir uns die Unterschiede anzeigen lassen &#8211; das komprimierte Archiv muss nat\u00fcrlich auf diesem liegen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-clone show-diff archiv.tar.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Um die Paket-Listen abzugleichen &#8211; ganz einfach:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-clone restore archiv.tar.gz<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Man hat hier einen Rechner stehen, einen dort &#8211; auf allen l\u00e4uft Debian oder eine darauf basierende Linux-Distribution und man will auf allen Rechnern dieselbe Software. Man kann sich nun Paket f\u00fcr Paket selbst manuell installieren, auf jedem Rechner hier und da &#8211; professionell Nutzer w\u00fcrden sich Skripte oder Befehle basteln, um an die passende [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":763,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64,17,4],"tags":[12,7,65,6],"class_list":["post-932","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-verwalten","category-system","category-terminal","tag-kommandozeile","tag-shell","tag-software-verwalten","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=932"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions"}],"predecessor-version":[{"id":936,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions\/936"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/763"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}