
APTonCD is an easy way to back up your installed packages to a disc or ISO image. You can quickly restore the packages on another Ubuntu system without downloading anything.
APTonCD是將安裝的軟件包備份到光盤或ISO映像的簡便方法。 您可以在不下載任何東西的情況下,在另一個Ubuntu系統上快速恢復軟件包。
After using APTonCD, you can install the backed up packages with a single action, add the packages as a software source, or restore them to your APT cache.
使用APTonCD之后,您可以通過一次操作安裝備份的軟件包,將軟件包添加為軟件源,或將其還原到APT緩存中。
安裝 (Installation)
APTonCD is available in Ubuntu’s default software repositories. Search for “APTonCD” in the Ubuntu Software Center and you’ll find it. It’s also available in Debian’s software repositories.
APTonCD在Ubuntu的默認軟件存儲庫中可用。 在Ubuntu軟件中心中搜索“ APTonCD”,您將找到它。 也可以在Debian的軟件存儲庫中找到。

You can also run the following command from a terminal:
您也可以從終端運行以下命令:
sudo apt-get install aptoncd
須藤apt-get install aptoncd
After it’s installed, you can launch it from the Dash.
安裝完成后,您可以從Dash啟動它。

備份程序包 (Backing Up Packages)
The “Create” button allows you to create a disc with your downloaded, cached DEB packages on it. This copies the packages from your APT cache (located in the /var/cache/apt/archives/ directory) to the disc. If you’ve used a clean-up utility such as Computer Janitor, the cached packages may no longer be present on your system.
“創建”按鈕使您可以創建包含下載的,已緩存的DEB軟件包的光盤。 這會將軟件包從APT緩存(位于/ var / cache / apt / archives /目錄中)復制到光盤上。 如果您使用了諸如Computer Janitor之類的清理實用程序,則緩存的軟件包可能不再存在于您的系統上。

APTonCD presents you with a list of your cached packages and automatically selects them all. You can deselect packages if you don’t want them on the disc. If you have additional DEB packages you want to add, click the Add button to add them to the list. You can also drag and drop DEB packages from a file manager onto the window.
APTonCD為您提供緩存軟件包的列表,并自動選擇它們。 如果您不希望光盤上顯示軟件包,則可以取消選擇軟件包。 如果還有其他要添加的DEB包,請單擊“添加”按鈕將它們添加到列表中。 您也可以將DEB包從文件管理器拖放到窗口上。

Once you’ve selected your packages, click the Burn button. Using the window that appears, you can select a CD or DVD image, specify a name and location for the ISO image file, and optionally create a meta-package. A meta-package is a single package that depends on all other packages on the disc – this allows you to easily install all the packages on the disc by telling APT to install a single package.
選擇軟件包后,單擊刻錄按鈕。 使用出現的窗口,您可以選擇CD或DVD映像,為ISO映像文件指定名稱和位置,還可以選擇創建元包。 元軟件包是依賴于光盤上所有其他軟件包的單個軟件包–通過告訴APT安裝單個軟件包,您可以輕松地將所有軟件包安裝在光盤上。

Click the Apply button and APTonCD will create an ISO image at the location you specified.
單擊“應用”按鈕,APTonCD將在您指定的位置創建一個ISO映像。

Once the image is created, you can have APTonCD launch a disc-burning application, such as Brasero, to burn it to a disc immediately. You can also burn the ISO image later. If you don’t have a disc drive – no problem, you can save the ISO image as a file and transport it between computers on a USB drive.
創建映像后,您可以讓APTonCD啟動光盤刻錄應用程序(例如Brasero)以立即將其刻錄到光盤上。 您也可以稍后刻錄ISO映像。 如果沒有光盤驅動器-沒問題,您可以將ISO映像另存為文件,并在USB驅動器上的計算機之間進行傳輸。

安裝所有軟件包 (Installing All Packages)
If you burnt the image to disc, you can insert it into your disc drive, open it in a file manager window, and double-click the package named “aptoncd-metapackage” to install it. This will install all packages on the disc. The package will not be present if you didn’t have APTonCD create a meta-package.
如果將映像刻錄到光盤,則可以將其插入光盤驅動器,在文件管理器窗口中將其打開,然后雙擊名為“ aptoncd-metapackage”的軟件包進行安裝。 這將在光盤上安裝所有軟件包。 如果您沒有APTonCD創建元軟件包,則該軟件包將不存在。

If you only have an ISO image, you can mount it as a disc and install packages from it.
如果只有ISO映像,則可以將其安裝為光盤并從中安裝軟件包。
將光盤添加為存儲庫 (Adding a Disc as a Repository)
The File –> Add CD/DVD option in APTonCD adds the disc to APT as a software source. The disc will be used as a repository in APT, so you can install packages from it using Synaptic, apt-get, or other package management tools, even if you’re offline.
APTonCD中的“文件”->“添加CD / DVD”選項會將光盤作為軟件源添加到APT。 該光盤將用作APT中的存儲庫,因此即使您處于離線狀態,也可以使用Synaptic,apt-get或其他軟件包管理工具從中安裝軟件包。

將軟件包還原到緩存 (Restoring Packages to Cache)
The Load button on the restore screen won’t do anything until you install the hal package on your system. Do so with the following command:
在系統上安裝hal軟件包之前,還原屏幕上的“加載”按鈕將不起作用。 使用以下命令執行此操作:
sudo apt-get install hal
須藤apt-get install hal

Restart APTonCD after running this command and you’ll be able to restore packages by clicking the Restore button. You can restore packages to any system, as long as the systems use the same architecture – for example, you can’t install 64-bit packages on a 32-bit installation of Ubuntu.
運行此命令后,重新啟動APTonCD,您將可以通過單擊“還原”按鈕來還原軟件包。 您可以將軟件包還原到任何系統,只要這些系統使用相同的體系結構即可。例如,您不能在32位Ubuntu上安裝64位軟件包。

Use the Load button on the Restore screen to specify a disc drive or ISO image file.
使用“還原”屏幕上的“加載”按鈕指定光盤驅動器或ISO映像文件。

After you have, you can click the Restore button to restore the downloaded packages to your APT cache. APT will use them to install the packages instead of downloading them.
完成后,可以單擊“還原”按鈕將下載的軟件包還原到APT緩存中。 APT將使用它們來安裝軟件包,而不是下載它們。

APTonCD is particularly useful for systems without Internet connections, but it’s also a quick way to restore your favorite packages after reinstalling Ubuntu from scratch – without having to remember them.
APTonCD對沒有Internet連接的系統特別有用,但是它也是從頭開始重新安裝Ubuntu之后無需記住它們即可恢復您喜歡的軟件包的快速方法。
Have you used APTonCD in the past? Share your experiences in the comments.
您過去曾經使用過APTonCD嗎? 在評論中分享您的經驗。
翻譯自: https://www.howtogeek.com/110034/how-to-back-up-restore-your-installed-ubuntu-packages-with-aptoncd/