Effortlessly Backup and Restore Your Ubuntu/Debian Systems with apt-clone tool

apt-clone is a simple command-line tool that lets you create state files of all installed packages for your Debian/Ubuntu systems, making it easy to restore on freshly installed systems or into a directory. Learn how to use apt-clone to backup and restore your system with ease.

1 min read
Effortlessly Backup and Restore Your Ubuntu/Debian Systems with apt-clone tool
Photo by Markus Winkler / Unsplash

Are you looking for an easy and reliable way to backup and restore packages on your Debian/Ubuntu systems? If yes, then apt-clone is the perfect tool for you!

apt-clone is a simple command-line tool that lets you create "state" files of all installed packages for your Debian/Ubuntu systems. These state files can be restored on freshly installed systems or into a directory, making it easy to get your system up and running again after a crash or other emergency.

There are several use cases for apt-clone, including cloning a server's package selection and restoring it on a fallback system, or backing up your system state to be able to restore it on other machine.

To create a clone, simply run the command:

$ sudo apt-clone clone ~/myhost

This will create an ~/myhost.apt-clone.tar.gz file that contains a state of all the packages installed on your system.

To get more information about the clone, run:

$ apt-clone info ~/myhost.apt-clone.tar.gz

This will give you details about the hostname, architecture, distribution, and more.

To restore the clone, run:

$ sudo apt-clone restore ~/myhost.apt-clone.tar.gz

This will install or remove packages based on the state in the archive, so be careful and make sure you understand what will be changed before restoring. If you want to debootstrap the clone into a specific directory, you can use the --destination option.

In conclusion, apt-clone is a powerful and simple tool that makes it easy to backup and restore your Debian or Ubuntu systems. Give it a try and never worry about losing your system packages.

apt-clone Github

Harduex blog


Follow