ubuntu系统备份和还原_如何使用Aptik在Ubuntu中备份和还原您的应用程序和PPA
ubuntu系統(tǒng)備份和還原
If you need to reinstall Ubuntu or if you just want to install a new version from scratch, wouldn’t it be useful to have an easy way to reinstall all your apps and settings? You can easily accomplish this using a free tool called Aptik.
如果您需要重新安裝Ubuntu,或者只想從頭開始安裝新版本,那么有一種簡(jiǎn)便的方法來(lái)重新安裝所有應(yīng)用程序和設(shè)置是否有用? 您可以使用名為Aptik的免費(fèi)工具輕松完成此操作。
Aptik (Automated Package Backup and Restore), an application available in Ubuntu, Linux Mint, and other Debian- and Ubuntu-based Linux distributions, allows you to backup a list of installed PPAs (Personal Package Archives), which are software repositories, downloaded packages, installed applications and themes, and application settings to an external USB drive, network drive, or a cloud service like Dropbox.
Aptik(自動(dòng)軟件包備份和還原)是在Ubuntu,Linux Mint以及其他基于Debian和UbuntuLinux發(fā)行版中可用的應(yīng)用程序,它允許您備份已安裝的PPA(個(gè)人軟件包檔案)列表,這些PPA是已下載的軟件存儲(chǔ)庫(kù)。程序包,已安裝的應(yīng)用程序和主題以及應(yīng)用程序設(shè)置到外部USB驅(qū)動(dòng)器,網(wǎng)絡(luò)驅(qū)動(dòng)器或Dropbox等云服務(wù)。
NOTE: When we say to type something in this article and there are quotes around the text, DO NOT type the quotes, unless we specify otherwise.
注意:當(dāng)我們說(shuō)要在本文中鍵入某些內(nèi)容并且文本周圍有引號(hào)時(shí),請(qǐng)不要鍵入引號(hào),除非我們另外指定。
To install Aptik, you must add the PPA. To do so, press Ctrl + Alt + T to open a Terminal window. Type the following text at the prompt and press Enter.
要安裝Aptik,您必須添加PPA。 為此,請(qǐng)按Ctrl + Alt + T打開“終端”窗口。 在提示符下鍵入以下文本,然后按Enter。
sudo apt-add-repository –y ppa:teejee2008/ppa
sudo apt-add-repository –y ppa:teejee2008 / ppa
Type your password when prompted and press Enter.
出現(xiàn)提示時(shí)輸入密碼,然后按Enter。
Type the following text at the prompt to make sure the repository is up-to-date.
在提示符下鍵入以下文本,以確保存儲(chǔ)庫(kù)是最新的。
sudo apt-get update
sudo apt-get更新
When the update is finished, you are ready to install Aptik. Type the following text at the prompt and press Enter.
更新完成后,就可以安裝Aptik了。 在提示符下鍵入以下文本,然后按Enter。
sudo apt-get install aptik
sudo apt-get install aptik
NOTE: You may see some errors about packages that the update failed to fetch. If they are similar to the ones listed on the following image, you should have no problem installing Aptik.
注意:您可能會(huì)看到有關(guān)更新無(wú)法獲取的程序包的一些錯(cuò)誤。 如果它們與下圖中列出的相似,則安裝Aptik應(yīng)該沒(méi)有問(wèn)題。
The progress of the installation displays and then a message displays saying how much disk space will be used. When asked if you want to continue, type a “y” and press Enter.
顯示安裝進(jìn)度,然后顯示一條消息,說(shuō)明將使用多少磁盤空間。 當(dāng)詢問(wèn)您是否要繼續(xù)時(shí),鍵入“ y”,然后按Enter。
When the installation if finished, close the Terminal window by typing “Exit” and pressing Enter, or by clicking the “X” button in the upper-left corner of the window.
安裝完成后,請(qǐng)通過(guò)鍵入“退出”并按Enter或單擊窗口左上角的“ X”按鈕來(lái)關(guān)閉“終端”窗口。
Before running Aptik, you should set up a backup directory on a USB flash drive, a network drive, or on a cloud account, such as Dropbox or Google Drive. For this example, will will use Dropbox.
在運(yùn)行Aptik之前,您應(yīng)該在USB閃存驅(qū)動(dòng)器,網(wǎng)絡(luò)驅(qū)動(dòng)器或云帳戶(例如Dropbox或Google Drive)上設(shè)置備份目錄。 對(duì)于此示例,將使用Dropbox。
Once your backup directory is set up, click the “Search” button at the top of the Unity Launcher bar.
設(shè)置備份目錄后,單擊Unity Launcher欄頂部的“搜索”按鈕。
Type “aptik” in the search box. Results of the search display as you type. When the icon for Aptik displays, click on it to open the application.
在搜索框中輸入“ aptik”。 輸入時(shí)顯示搜索結(jié)果。 當(dāng)顯示Aptik的圖標(biāo)時(shí),單擊它以打開應(yīng)用程序。
A dialog box displays asking for your password. Enter your password in the edit box and click “OK.”
出現(xiàn)一個(gè)對(duì)話框,要求您輸入密碼。 在編輯框中輸入密碼,然后單擊“確定”。
The main Aptik window displays. Select “Other…” from the “Backup Directory” drop-down list. This allows you to select the backup directory you created.
顯示Aptik主窗口。 從“備份目錄”下拉列表中選擇“其他”。 這使您可以選擇創(chuàng)建的備份目錄。
NOTE: The “Open” button to the right of the drop-down list opens the selected directory in a Files Manager window.
注意:下拉列表右側(cè)的“打開”按鈕可在“文件管理器”窗口中打開所選目錄。
On the “Backup Directory” dialog box, navigate to your backup directory and then click “Open.”
在“備份目錄”對(duì)話框上,導(dǎo)航到您的備份目錄,然后單擊“打開”。
NOTE: If you haven’t created a backup directory yet, or you want to add a subdirectory in the selected directory, use the “Create Folder” button to create a new directory.
注意:如果尚未創(chuàng)建備份目錄,或者要在所選目錄中添加子目錄,請(qǐng)使用“創(chuàng)建文件夾”按鈕創(chuàng)建一個(gè)新目錄。
To backup the list of installed PPAs, click “Backup” to the right of “Software Sources (PPAs).”
要備份已安裝的PPA列表,請(qǐng)單擊“軟件源(PPA)”右側(cè)的“備份”。
The “Backup Software Sources” dialog box displays. The list of installed packages and the associated PPA for each displays. Select the PPAs you want to backup, or use the “Select All” button to select all the PPAs in the list.
顯示“備份軟件源”對(duì)話框。 每個(gè)顯示的已安裝軟件包列表和關(guān)聯(lián)的PPA。 選擇要備份的PPA,或使用“全選”按鈕選擇列表中的所有PPA。
Click “Backup” to begin the backup process.
單擊“備份”開始備份過(guò)程。
A dialog box displays when the backup is finished telling you the backup was created successfully. Click “OK” to close the dialog box.
備份完成后,將顯示一個(gè)對(duì)話框,告訴您備份已成功創(chuàng)建。 單擊“確定”關(guān)閉對(duì)話框。
A file named “ppa.list” will be created in the backup directory.
將在備份目錄中創(chuàng)建一個(gè)名為“ ppa.list”的文件。
The next item, “Downloaded Packages (APT Cache)”, is only useful if you are re-installing the same version of Ubuntu. It backs up the packages in your system cache (/var/cache/apt/archives). If you are upgrading your system, you can skip this step because the packages for the new version of the system will be newer than the packages in the system cache.
下一項(xiàng)“ Downloaded Packages(APT Cache)”僅在您重新安裝相同版本的Ubuntu時(shí)才有用。 它將備份系統(tǒng)緩存中的軟件包(/ var / cache / apt / archives)。 如果要升級(jí)系統(tǒng),則可以跳過(guò)此步驟,因?yàn)樾掳姹鞠到y(tǒng)的軟件包將比系統(tǒng)緩存中的軟件包新。
Backing up downloaded packages and then restoring them on the re-installed Ubuntu system will save time and Internet bandwidth when the packages are reinstalled. Because the packages will be available in the system cache once you restore them, the download will be skipped and the installation of the packages will complete more quickly.
備份下載的軟件包,然后將其還原到重新安裝的Ubuntu系統(tǒng)上,可以在重新安裝軟件包時(shí)節(jié)省時(shí)間和Internet帶寬。 由于還原后,這些軟件包將在系統(tǒng)緩存中可用,因此下載將被跳過(guò),并且軟件包的安裝將更快地完成。
If you are reinstalling the same version of your Ubuntu system, click the “Backup” button to the right of “Downloaded Packages (APT Cache)” to backup the packages in the system cache.
如果要重新安裝相同版本的Ubuntu系統(tǒng),請(qǐng)單擊“下載的軟件包(APT緩存)”右側(cè)的“備份”按鈕,以將軟件包備份到系統(tǒng)緩存中。
NOTE: When you backup the downloaded packages, there is no secondary dialog box. The packages in your system cache (/var/cache/apt/archives) are copied to an “archives” directory in the backup directory and a dialog box displays when the backup is finished, indicating that the packages were copied successfully.
注意:備份下載的軟件包時(shí),沒(méi)有第二個(gè)對(duì)話框。 系統(tǒng)緩存(/ var / cache / apt / archives)中的軟件包將復(fù)制到備份目錄中的“ archives”目錄中,并且在備份完成后將顯示一個(gè)對(duì)話框,指示軟件包已成功復(fù)制。
There are some packages that are part of your Ubuntu distribution. These are not checked, since they are automatically installed when you install the Ubuntu system. For example, Firefox is a package that is installed by default in Ubuntu and other similar Linux distributions. Therefore, it will not be selected by default.
Ubuntu發(fā)行版中包含一些軟件包。 這些未選中,因?yàn)樵诎惭bUbuntu系統(tǒng)時(shí)會(huì)自動(dòng)安裝它們。 例如,Firefox是默認(rèn)情況下安裝在Ubuntu和其他類似Linux發(fā)行版中的軟件包。 因此,默認(rèn)情況下不會(huì)選擇它。
Packages that you installed after installing the system, such as the package for the Chrome web browser or the package containing Aptik (yes, Aptik is automatically selected to back up), are selected by default. This allows you to easily back up the packages that are not included in the system when installed.
默認(rèn)情況下會(huì)選擇安裝系統(tǒng)后安裝的軟件包,例如Chrome Web瀏覽器的軟件包或包含Aptik的軟件包(是的,將自動(dòng)選擇Aptik進(jìn)行備份)。 這樣一來(lái),您可以輕松備份系統(tǒng)中未包含的軟件包。
Select the packages you want to back up and de-select the packages you don’t want to backup. Click “Backup” to the right of “Software Selections” to back up the selected top-level packages.
選擇您要備份的軟件包,然后取消選擇您不想備份的軟件包。 單擊“軟件選擇”右側(cè)的“備份”以備份選定的頂級(jí)程序包。
NOTE: Dependency packages are not included in this backup.
注意:依賴性程序包不包括在此備份中。
Two files, named “packages.list” and “packages-installed.list”, are created in the backup directory and a dialog box displays indicating that the backup was created successfully. Click “OK” to close the dialog box.
在備份目錄中創(chuàng)建了兩個(gè)名為“ packages.list ”和“ packages-installed.list”的文件,并顯示一個(gè)對(duì)話框,指示已成功創(chuàng)建備份。 單擊“確定”關(guān)閉對(duì)話框。
NOTE: The “packages-installed.list” file lists all the packages. The “packages.list” file also lists all the packages, but indicates which ones were selected.
注意:“ packages-installed.list”文件列出了所有軟件包。 “ packages.list”文件還列出了所有軟件包,但指出了選擇了哪些軟件包。
To backup settings for installed applications, click the “Backup” button to the right of “Application Settings” on the main Aptik window. Select the settings you want to back up and click “Backup”.
要備份已安裝應(yīng)用程序的設(shè)置,請(qǐng)?jiān)贏ptik主窗口中單擊“應(yīng)用程序設(shè)置”右側(cè)的“備份”按鈕。 選擇要備份的設(shè)置,然后單擊“備份”。
NOTE: Click the “Select All” button if you want to back up all application settings.
注意:如果要備份所有應(yīng)用程序設(shè)置,請(qǐng)單擊“全選”按鈕。
The selected settings files are zipped into a file called “app-settings.tar.gz”.
所選設(shè)置文件被壓縮到名為“ app-settings.tar.gz”的文件中。
When the zipping is complete, the zipped file is copied to the backup directory and a dialog box displays telling you that the backups were created successfully. Click “OK” to close the dialog box.
壓縮完成后,將壓縮文件復(fù)制到備份目錄,并顯示一個(gè)對(duì)話框,告訴您備份已成功創(chuàng)建。 單擊“確定”關(guān)閉對(duì)話框。
Themes from the “/usr/share/themes” directory and icons from the “/usr/share/icons” directory can also be backed up. To do so, click the “Backup” button to the right of “Themes and Icons”. The “Backup Themes” dialog box displays with all the themes and icons selected by default. De-select any themes or icons you don’t want to back up and click “Backup.”
也可以備份“ / usr / share / themes”目錄中的主題和“ / usr / share / icons”目錄中的圖標(biāo)。 為此,請(qǐng)單擊“主題和圖標(biāo)”右側(cè)的“備份”按鈕。 將顯示“備份主題”對(duì)話框,默認(rèn)情況下將選中所有主題和圖標(biāo)。 取消選擇您不想備份的任何主題或圖標(biāo),然后單擊“備份”。
The themes are zipped and copied to a “themes” directory in the backup directory and the icons are zipped and copied to an “icons” directory in the backup directory. A dialog box displays telling you that the backups were created successfully. Click “OK” to close the dialog box.
將主題壓縮并復(fù)制到備份目錄中的“主題”目錄,將圖標(biāo)壓縮并復(fù)制到備份目錄中的“ icons”目錄。 出現(xiàn)一個(gè)對(duì)話框,告訴您備份已成功創(chuàng)建。 單擊“確定”關(guān)閉對(duì)話框。
Once you’ve completed the desired backups, close Aptik by clicking the “X” button in the upper-left corner of the main window.
完成所需的備份后,通過(guò)單擊主窗口左上角的“ X”按鈕關(guān)閉Aptik。
Your backup files are available in the backup directory you chose.
您的備份文件位于您選擇的備份目錄中。
When you re-install your Ubuntu system or install a new version of Ubuntu, install Aptik on the newly installed system and make the backup files you generated available to the system. Run Aptik and use the “Restore” button for each item to restore your PPAs, applications, packages, settings, themes, and icons.
當(dāng)您重新安裝Ubuntu系統(tǒng)或安裝新版本的Ubuntu時(shí),請(qǐng)?jiān)谛掳惭b的系統(tǒng)上安裝Aptik,并使生成的備份文件對(duì)系統(tǒng)可用。 運(yùn)行Aptik,然后對(duì)每個(gè)項(xiàng)目使用“還原”按鈕來(lái)還原您的PPA,應(yīng)用程序,程序包,設(shè)置,主題和圖標(biāo)。
翻譯自: https://www.howtogeek.com/206454/how-to-backup-and-restore-your-apps-and-ppas-in-ubuntu-using-aptik/
ubuntu系統(tǒng)備份和還原
總結(jié)
以上是生活随笔為你收集整理的ubuntu系统备份和还原_如何使用Aptik在Ubuntu中备份和还原您的应用程序和PPA的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 当检测到运动时如何自动打开门灯
- 下一篇: 如何使用APTonCD备份和还原已安装的