ubuntu还原初始状态

ubuntu还原初始状态

00_lead_image_timeshift

Wouldn’t it be nice to be able to try a new version of Ubuntu while knowing you can return to the previous version if you don’t like it? We’ll show you a tool that allows you to take a snapshot of your system at any time.

能够尝试新版本的Ubuntu,同时又知道如果您不喜欢可以返回以前的版本,这不是很好吗? 我们将向您展示一个工具,该工具可让您随时拍摄系统快照。

TimeShift is a free tool that is similar to the System Restore feature in Windows. It allows you to initially take a snapshot of your system and then to take incremental snapshots at regular intervals. TimeShift protects only system files and settings, not user files such as documents, pictures, and music. You can use a tool like Back In Time to backup your user files.

TimeShift是一个免费工具,类似于Windows中的“系统还原”功能。 它使您可以首先对系统进行快照,然后定期进行增量快照。 TimeShift仅保护系统文件和设置,不保护用户文件,例如文档,图片和音乐。 您可以使用“ 时光倒流”之类的工具来备份用户文件。

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.

注意:当我们说要在本文中键入某些内容并且文本周围有引号时,请不要键入引号,除非我们另外指定。

Recently, we showed you how to back up your applications and PPAs using a tool called Aptik, which is included in the same PPA as TimeShift. First, press Ctrl + Alt + T to open a Terminal window. If you haven’t installed Aptik, type the following two commands (separately) at the prompt, pressing Enter after each command, to add the PPA and update it. For more information, see our article about Aptik. Note: you may have to remove the -y switch to get it to work.

最近,我们向您展示了如何使用称为Aptik的工具备份应用程序和PPA,该工具与TimeShift包含在同一PPA中。 首先,按Ctrl + Alt + T打开“终端”窗口。 如果尚未安装Aptik,请在提示符下分别键入以下两个命令,在每个命令后按Enter,以添加PPA并更新它。 有关更多信息,请参见我们有关Aptik的文章。 注意:您可能必须删除-y开关才能使其正常工作。

sudo apt-add-repository -y ppa:teejee2008/ppa

sudo apt-get update
sudo apt-add-repository -y ppa:teejee2008/ppa

sudo apt-get update

If you have installed Aptik, you are ready to install TimeShift and do not need to enter the previous commands. Type the following text at the prompt and press Enter.

如果您已经安装了Aptik,则可以安装TimeShift,而无需输入以前的命令。 在提示符下键入以下文本,然后按Enter。

sudo apt-get install timeshift

sudo apt-get安装时移

Type your password when prompted and press Enter.

出现提示时输入密码,然后按Enter。

01_command_to_install_timeshift

Once the installation is finished, close the Terminal window by typing “exit” at the prompt and pressing Enter or by clicking the “X” button in the upper-left corner of the window.

安装完成后,通过在提示符下键入“ exit”并按Enter或单击窗口左上角的“ X”按钮来关闭“终端”窗口。

02_closing_terminal

To open TimeShift, click the “Search” button at the top of the Unity Launcher bar.

要打开TimeShift,请单击Unity Launcher栏顶部的“搜索”按钮。

03_opening_search

Type “timeshift” in the search box. Results of the search display as you type. When the icon for TimeShift displays, click on it to open the application.

在搜索框中输入“ timeshift”。 输入时显示搜索结果。 当显示TimeShift图标时,单击它以打开应用程序。

04_starting_timeshift

A dialog box displays asking for your password. Enter your password in the edit box and click “OK.”

出现一个对话框,要求您输入密码。 在编辑框中输入密码,然后单击“确定”。

05_entering_password

The main TimeShift window displays and the system size is estimated. The “Backup Device” drop-down list allows you to select a different drive or partition to be backed up, if you have more than one.

此时将显示TimeShift主窗口,并估计系统大小。 如果有多个驱动器或分区,则可以使用“备份设备”下拉列表选择要备份的其他驱动器或分区。

06_estimating_system_size

The amount of space needed for the snapshot is listed on the bottom status bar. Snapshots are saved on the selected device so be sure you have enough space to store the snapshot. To back up the selected “Backup Device,” click “Backup” on the toolbar.

快照所需的空间量在底部状态栏上列出。 快照将保存在所选设备上,因此请确保您有足够的空间来存储快照。 要备份所选的“备份设备”,请在工具栏上单击“备份”。

07_take_a_manual_on_demand_snapshot

While the snapshot is being created, a “Synching files…” message displays in the bottom status bar.

创建快照时,底部状态栏中会显示“正在同步文件...”消息。

08_synching_files

When the snapshot is finished, it is listed with the date and time and the name and version of the system. The status bar states how much space is free on the system after the snapshot is taken and states when the last snapshot was taken.

快照完成后,它将列出日期和时间以及系统的名称和版本。 状态栏说明在拍摄快照后系统上有多少可用空间,并说明何时拍摄最后一个快照。

09_snapshot_created

Moving the mouse over the “Backup Device” drop-down list shows you the path where the snapshots are saved on the selected device.

将鼠标移到“备份设备”下拉列表上,可以显示快照在所选设备上的保存路径。

10_location_of_snapshots_popup

The “timeshift” directory contains the various snapshots taken using TimeShift, including scheduled snapshots, which we will discuss later in this article.

“ timeshift”目录包含使用TimeShift拍摄的各种快照,包括计划的快照,我们将在本文后面讨论。

11_snapshots_directory

The “snapshots” folder contains snapshots taken manually. We recommend that you copy the folder for your snapshot to a USB flash drive, network drive, or a cloud service, such as Dropbox or Google Drive, in case it gets corrupted or deleted.

“ snapshots”文件夹包含手动拍摄的快照。 我们建议您将快照文件夹复制到USB闪存驱动器,网络驱动器或Dropbox或Google Drive等云服务,以防其损坏或删除。

12_snapshot_folder

You can see what’s in the snapshot by clicking the “Browse” button.

您可以通过单击“浏览”按钮查看快照中的内容。

13_clicking_browse

The snapshot directory is opened in a Files Manager window and the directories and files from your system (no user files) are listed.

在“文件管理器”窗口中打开快照目录,并列出系统中的目录和文件(无用户文件)。

14_contents_of_snapshot_folder

There are various settings you can customize, such as setting up automatic backups and choosing when older snapshots will be automatically removed. To access the settings, click “Settings” on the toolbar.

您可以自定义各种设置,例如设置自动备份以及选择何时自动删除旧快照。 要访问设置,请单击工具栏上的“设置”。

15_clicking_settings

The “Schedule” tab allows you to specify times when snapshots will be performed. Click or slide the ON/OFF slider button to turn on the “Scheduled Snapshots”. Select the check boxes in the “Enable” column to specify the time interval for the snapshots.

“时间表”选项卡允许您指定执行快照的时间。 单击或滑动“开/关”滑块按钮以打开“计划的快照”。 选中“启用”列中的复选框以指定快照的时间间隔。

16_settings_schedule

The “Auto-Remove” tab allows you to automatically remove older snapshots so you don’t run out of space on your hard drive. There is a “Rule” for each type of snapshot. Enter a “Limit” for each type to tell TimeShift to remove snapshots older than the specified limit, including a limit for when free space is less than a certain amount.

“自动删除”选项卡使您可以自动删除较旧的快照,从而不会耗尽硬盘驱动器上的空间。 每种类型的快照都有一个“规则”。 为每种类型输入一个“限制”,以告诉TimeShift删除早于指定限制的快照,包括当可用空间小于一定量时的限制。

17_auto_remove_tab

The “Advanced” tab allows you to exclude specific files, directories, and directory contents from and include specific files and directories in the snapshots.

“高级”选项卡允许您从快照中排除特定文件,目录和目录内容,并在快照中包括特定文件和目录。

When you’ve finished customizing the settings, click “Save.”

完成自定义设置后,请点击“保存”。

18_advanced_tab

When you want to restore a snapshot, open TimeShift, select a snapshot and click “Restore.”

要还原快照时,请打开TimeShift,选择一个快照,然后单击“还原”。

NOTE: Depending on the state of your system, you might have to install TimeShift again.

注意:根据系统状态,您可能必须再次安装TimeShift。

19_clicking_restore

The “Target” tab on the “Restore” dialog box allows you to specify the device to which you will restore the selected snapshot. Moving the mouse over the device in the list reveals more information about the device for restoring the snapshot. Select the “Device for Restoring Snapshot” and the “Device for Bootloader Installation.”

“还原”对话框上的“目标”选项卡允许您指定要将所选快照还原到的设备。 将鼠标移到列表中的设备上会显示有关用于还原快照的设备的更多信息。 选择“用于还原快照的设备”和“用于Bootloader安装的设备”。

20_selecting_snapshot

Use the “Exclude” tab to select applications for which you want to keep the current settings and not restore the previous settings.

使用“排除”选项卡选择要保留其当前设置而不恢复其先前设置的应用程序。

21_exclude_tab_for_restore

The “Advanced” tab allows you to exclude specific files, directories, and directory contents from and include specific files and directories in the restored system.

“高级”选项卡允许您从还原的系统中排除特定的文件,目录和目录内容,并包括特定的文件和目录。

22_exclude_tab_for_restore

To close TimeShift, click the “X” button in the upper-left corner of the main window.

要关闭TimeShift,请单击主窗口左上角的“ X”按钮。

23_closing_timeshift

TimeShift is a useful tool if you like experimenting with upgrades to your system or if something goes wrong with your system. Just like System Restore in Windows, you can simply restore your system to a previous working state rather than reinstalling your system.

如果您喜欢尝试对系统进行升级或系统出了问题,则TimeShift是有用的工具。 就像Windows中的系统还原一样,您可以简单地将系统还原到以前的工作状态,而无需重新安装系统。

翻译自: https://www.howtogeek.com/206491/how-to-restore-your-ubuntu-linux-system-to-its-previous-state/

ubuntu还原初始状态

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐