Přenos instalace (nainstalovaných balíků, dpkg, apt), klonování na další počítač

Zkoupírujte si apt sources a klíče pro použití na novém systému.
Dále:

dpkg -l vypíše seznam nainstalovaných (i případně smazaných) balíků, které mají ještě config soubory

dpkg --get-selections > baliky
sudo apt-get install --reinstall `cat baliky`

– první příkaz uloží seznam všech nainstalovaných balíků do „baliky“
– druhý příkaz nám nainstaluje seznam všech ablíků ze souboru „baliky“

 

2. Varianta

Nebo je zde možnost přenést na jiný stroj také stáhnuté balíky.
Překopírujeme balíky z adresáře:

/var/cache/apt/archives

A potom zadame:

dpkg --set-selections baliky

 

— nebo —

dpkg --get-selections > baliky

dpkg --set-selections < baliky

Poté 

apt-get dselect-upgrade

nainstaluje všechny balíky ze souboru  baliky

 

— další —

Provided by: apt-dater_1.0.2+git20151216-1_amd64 bug

NAME

       apt-dater - terminal-based remote package update manager

SYNOPSIS

       apt-dater [[-(c config|v|[n]r)]]

DESCRIPTION

       This manual page documents briefly the apt-dater command.

       apt-dater is a program to manage package updats on a large number of remote hosts using
       SSH.

OPTIONS

       apt-dater accepts the following command parameters:

       -c config
           Use alternative config file. Default is $XDG_CONFIG_HOME/apt-dater/apt-dater.xml.

       -v
           Show apt-dater version and copyright statement.

       -r
           Refresh hosts and create XML report on stdout. apt-dater must be compiled with
           XMLREPORT feature.

       -n
           Prevent hosts to be refreshed before create XML report (useful for cronjobs which do
           not have access to SSH key(s)).

ENVIRONMENT

       MAINTAINER
           The maintainer's name (i.e. used by debtrack). If not set, the GECOS entry for the
           current user will be used. This environment variable could be forwarded to remote
           hosts with the ssh(1) SendEnv+AcceptEnv options.

FILES

       ~/.config/apt-dater/apt-dater.xml
           The configuration file of apt-dater

       ~/.config/apt-dater/hosts.xml
           Contains all hosts you would like to manage

SEE ALSO

       apt-dater.xml(5), apt-get(1), debtrack, ssh(1), XDG Base Directory Specification[1].

AUTHORS

       Thomas Liske <liske@ibh.de>
           maintainer

       Andre Ellguth
           ex-maintainer

       Copyright © 2008-2014 IBH IT-Service GmbH [https://www.ibh.de/]

NOTES

1. XDG Base Directory Specification
           http://www.freedesktop.org/Standards/basedir-spec

--- další ----

tmux is capable of connecting to multiple machines and running commands simultaneously. Connect to each host in a pane and use the ‚synchronize-panes’ window option to send each pane the same keyboard input simultaneously.

The command looks like:

:setw synchronize-panes

Following is a complete example, let’s create a window with 3 panes, each logged into a different server:

$ tmux new -s 'update packages' 'ssh admin@host1' \; split-window -h 'ssh admin@host2' \; split-window -h 'ssh admin@host3' \; select-layout even-horizontal

Once you have logged into the servers being upgraded, on the tmux prompt (C-b :), enter ‚setw synchronize-panes’

Synchronize-panes option

Now everything you type will be input to all panes

Synced Panes

Note: As mentioned in another post, tools like ‚pssh‘ and ‚csshX‘ may be better suited for this purpose.