In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install and use apt-clone under Linux, Xiaobian feels quite practical, so share it with you as a reference, I hope you can gain something after reading this article.
When we use apt-clone on Ubuntu/Debian based systems, package installation becomes easier.
If you need to install the same package on a small number of systems, apt-clone is for you.
What is apt-clone?
apt-clone allows you to create a backup of all installed packages for Debian/Ubuntu systems that can be restored in a newly installed system (or container) or directory. This backup can be restored on multiple systems of the same operating system version and architecture.
How to install apt-clone?
The apt-clone package can be found in the official Ubuntu/Debian repository, so use apt package manager or apt-get package manager to install it. Install apt-clone using apt package manager.
$ sudo apt install apt-clone How do I back up installed packages using apt-clone?
After apt-clone is successfully installed. Just provide a location to save backup files. We will save a backup of the installed packages in the/backup directory. apt-clone saves the list of installed packages to apt-clone-state-Ubuntu18.2daygeek.com.tar.gz.
$ sudo apt-clone clone /backup
We can also check by running ls command.
$ ls -lh /backup/total 32K-rw-r--r-- 1 root root 29K Apr 20 19:06 apt-clone-state-Ubuntu18.2daygeek.com.tar.gz
Run the following command to view the details of the backup file.
$ apt-clone info /backup/apt-clone-state-Ubuntu18.2daygeek.com.tar.gzHostname: Ubuntu18.2daygeek.comArch: amd64Distro: bionicMeta: libunity-scopes-json-def-desktop, ubuntu-desktopInstalled: 1792 pkgs (194 automatic)Date: Sat Apr 20 19:06:43 2019
According to the output above, there are a total of 1792 packages in the backup file.
How do I recover packages backed up using apt-clone?
You can use any remote copy program to copy files on remote servers.
$ scp /backup/apt-clone-state-ubunt-18-04.tar.gz Destination-Server:/opt
After replication is complete, perform a restore using apt-clone. Use the following command to restore.
$ sudo apt-clone restore /opt/apt-clone-state-Ubuntu18.2daygeek.com.tar.gz
Note that restore overwrites the existing/etc/apt/sources.list and installs/removes packages. So be careful. If you want to restore all packages to folders instead of actually restoring them, you can use the following command.
$ sudo apt-clone restore /opt/apt-clone-state-Ubuntu18.2daygeek.com.tar.gz --destination /opt/oldubuntu
About "how to install and use apt-clone under Linux" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.