It is very unlikely that you are using Ubuntu PC with only the packages included in the basic installation. Over time, you have probably installed different packages from the Ubuntu Software Center and you may have even added the occasional application via a Personal Package Archive (PPA).
However, if you need to re-install Ubuntu, for whatever reason, like getting new hardware or replacing a failed disk etc., then having to re-install all your favorite applications can be a pain. Thankfully there is a solution and it is called Aptik.
Aptik is a tool that simplifies the re-installation of packages after doing a new Ubuntu installation. It has two main modes – Backup and Restore. Various information about the packages currently installed on your Ubuntu machine, along with information about the sources of those packages (i.e. any PPAs you have added), can be backed up to a local hard drive or even an external USB flash drive. After a fresh install of Ubuntu, you can then use Aptik to re-install those packages without having to go hunting around in the Ubuntu Software Center or issuing dozens of
apt-get install commands.
To get Aptik, you need to add a PPA and then install the software. This isn’t hard and can be achieved using the following three commands:
To launch it, type “
aptik” in the Ubuntu launcher and click on the Aptik icon. You will need to enter your password as Aptik runs with root privileges.
Before you can perform a backup or restore, you need to choose the directory where the backup will be stored or from where it will be restored. At the top of the Aptik window, click on the “Backup Directory” drop down box. When you start the program, the “Backup Directory” is set to “(None).” If you are going to reformat the hard disk (and you don’t have a second hard disk), then it is probably best to choose a backup directory on an external device, like a USB flash drive. To pick a location not listed in the drop down box, click “Other…” and navigate to your desired backup location.
Once you have selected the backup directory, you have four backup options and four restore options. As you would expect, the restore actions are the opposite of the backup options.
In either case, you can back up/restore the PPAs you have added to your system, back up/restore the packages that APT has downloaded, back up/restore the packages that have been added over and above the basic Ubuntu installation, and back up/restore your themes and icons.
Except for the “Downloaded Packages (APT Cache)” option, each backup or restore action offers you the chance to select which items you want to back up or restore. In most cases, the default selection is sufficient.
To test Aptik, try installing a package from the Ubuntu Software Center, then perform a “Software Selections” backup. Now remove the package you installed and perform a restore in Aprik. Watch how Aptik reinstalls the package you just removed.
More backups needed
Although Aptik is a very useful tool, it isn’t designed to be a comprehensive data backup solution for those who need to reinstall Ubuntu. Before you re-install, you need to make sure all your data is safely backed up including your documents, photos and music files. If you are using an email client like Thunderbird or Evolution then you need to make sure that all the application data (i.e. your mail messages) is also backed up. You may also want to save the settings and configuration data of services like any SMTP, HTTP, MySQL or Samba servers you have running.
It is also worth noting that Aptik doesn’t save any extra non-PPA sources that you have added to your “
sources.list” file. This means that if are using Ubuntuzilla to get the latest official versions of Firefox, SeaMonkey, and Thunderbird then you will need to add it, and any other repositories you use, back to the
sources.list file manually.
If you have questions about Aptik, please feel free to ask them in the comments below and we will see if we can help.