Revision of Cloning a system - or: How to make a copy of installed packages from one computer to another from Thu, 10/13/2016 - 18:40
The revisions let you track differences between multiple versions of a post.
To set up a new Trisquel system that would have the same applications as an existing Trisquel system, one does not need to manually select the same list of packages and to download them again. This manual explains how to save time and bandwidth. It is, in fact, not specific to Trisquel: it applies to any Debian derivative where the "Synaptic Package Manager" is (or can be) installed.
To export the list of packages installed on the system to clone:
- launch the "Synaptic Package Manager" (in the "System Settings") and enter your password;
- click on "Save Markings" in the "File" menu;
- choose where to save the list of installed packages and a name for that file;
- click, at the bottom of the window, the box that says "Save full state, not only changes" and, finally, the "Save" button.
That file must now end up on the new system, where Trisquel was freshly installed. To do so, you can use a removable device (such as a USB key), SSH (an SSH server must then be installed on one of the two systems) or any other mean. Many, if not all, the DEB packages that relate to this list are in the "/var/cache/apt" directory of the system to clone. Assuming both systems have the same architecture (either 32 bits or 64 bits), there is no need to download them again: the "/var/cache/apt" directory can be copied to the analog directory in the fresh installation. Again, this can be achieved through a (large-enough) removable device or through SSH or...
To install the same packages on the fresh Trisquel:
- launch the "Synaptic Package Manager" (in the "System Settings") and enter your password;
- click on "Read Markings..." in the "File" menu;
- open the list of packages you have just transfered;
- click the "Apply" button and confirm.
To copy user files (e.g., the personal configuration for the applications, i.e., the hidden files and directories in the home folder, whose names start with a dot), any mean can be employed. However, one should regularly backup user files, e.g., using the eponymous tool in the "System Settings". The files can then be restored from the backup onto the fresh install. A warning may be displayed to indicate that the system is different from the one used to backup.