How to restore linux

How I do a system restore?

Think outside the windows box (and Google your question). You can just zip up whole chunks of your system, but saying that system failure is a serious problem just isn’t true. I run Linux on all of my computers (bleeding-edge Arch Linux, so stability should suffer), and I have yet to see my computer crash or malfunction. Did I mention the computers have been running Arch for 2-4 years each?

It might have been worth doing an apt-get purge on the package that broke your system since this is supposed to remove any settings associated with it.

@Blender I am a 100% Linux user from 2 years now. Although I hate Windows System restore, but in linux some times X updates break your graphics, there should be something like sandbox or somthing.. to undo that.

6 Answers 6

There is a software for Linux called Timeshift exactly for this purpose. Using Timeshift you can take snapshots of your Linux system regularly and restore them whenever you need.

This software brings System Restore feature of Windows to your Linux distribution.

A short description from its official website:

TimeShift for Linux is a application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. TimeShift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored later to bring your system to the exact state it was in at the time when the snapshot was taken.

Snapshots are taken using rsync and hard-links. Common files are shared between snapshots which saves disk space. Each snapshot is a full system backup that can be browsed with a file manager.

That sounds nice, but if I haven’t taken snapshots already, I can not take advantage of it. :/ right?

Actually, there are few things in Ubuntu et al. that will allow you to roll-back changes. Brief below:

  1. /var/backups/dpkg.status.* : this directory keeps a set of log of the last system state prior to an install as follows; /var/backups/dpkg.status.0 is the most recent log prior to a state change (e.g. package install/remove/update . etc); /var/backups/dpkg.status. gz are compressed, archived versions of the logs at various points in time, rotated monthly.
  2. /var/lib/dpkg/status : this is the current state of installed packages. Manually backing this up, or providing a logrotate script in /etc/logrotate.d will ensure schedule snapshots of your system state to your liking.
  3. Roll-back: the corner stone is your previous state /var/backups/dpkg.status.0 . Here is a brief step-wise procedure to restore previous package state (note brief and not exhaustive). a. cp /var/backups/dpkg.status /var/lib/dpkg/status (will revert back the package state one version back). b. dpkg -l | grep ii (will give you a list of supposedly installed packages based on the rolled-back /var/lib/dpkg/status file achieved in step a. above). c. dpkg -l | grep ii | awk » > /tmp/reinstall && sh /tmp/reinstall (will create a simple one-liner shell script and runs that to reinstall packages determined to have been on the system prior to an apt-get operation) d. apt-get —reinstall install ucf (will take care of sanitising /etc config files et. al) e. Repeat step c. if/as necessary
Читайте также:  Punto switcher аналоги linux

With a minimal bit of luck, you should be OK.

Источник

How to Restore Ubuntu to a Previous Working State

Restore Ubuntu

Ubuntu is one of the most user-friendly and secure Linux operating system distributions. It is no surprise then that it’s growing in popularity with every passing day. However, even this amazing OS distribution can get corrupted if you install incorrect drivers or malicious programs. In those moments, all you would want to do is to restore Ubuntu to its previous settings or perform a complete factory reset without losing your data. And thankfully, with open-source tools such as Systemback, you can do just that with ease.

What does it mean by restoring Ubuntu?

Restoring Ubuntu to a previous working state is the action of reverting any changes that has been made that resulted in a system failure or error. This could be a simple error to a fatal flaw that prevents the Ubuntu machine from booting up. As you may be already aware, you can simply reinstall Ubuntu and make it work again. But, it is not an ideal solution, especially if you have important data residing in the same partition as the Ubuntu files.

How to restore Ubuntu using Systemback?

In this article, we will show you how to install Systemback to your Ubuntu device, create a restore point, and revert your Ubuntu to its previous settings. So, without any further ado, let’s dig in.

What is Systemback?

Systemback is an open-source tool for Linux users that helps them back up their files and restore the system to factory settings or previous system settings. With this tool, Linux users can create restore points for a particular file or the whole system with ease. Therefore, if you ever face a problem with your computer, you can revert the operating system to its previous setup or do a complete factory reset.

Step 1. Install Systemback on your Ubuntu machine

To retrieve your Ubuntu device safely and securely, you must install the Systemback software first. These are the steps to install Systemback on Ubuntu –

  1. Open your Ubuntu device and press the “CTRL + ALT + T” keys on your keyboard to open the “Terminal.”
  2. Once the “Terminal” opens, type:
    $ sudo add-apt-repository “deb http://ppa.launchpad.net/nemh/systemback/ubuntu xenial main
  3. Press the “Enter” key. This will add the PPA (Personal Package Archive) of the software to the computer.
  4. Next, you have to import the GPG (GNU Privacy Guard) signing key. To do this, type:
    $ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 382003C2C8B7B4AB813E915B14E4942973C62A1B
  5. Press “Enter” once again.
  6. Now, you have to update your local apt repository. In order to achieve it, type, “$ sudo apt update” without quotations marks in the “Terminal” and press the “Enter” key.
  7. After that, type “$ sudo apt install systemback” and press “Enter” yet again. This will start installing the Systemback software — a process that might take a while.
  8. Once the installation process is complete, you can easily open the Systemback software from:
    1. Opening the dash menu
    2. Launching “Terminal” and typing “$ sudo systemback” without quotation marks and pressing “Enter” to open the program directly

    There are two ways you can use Systemback to restore Ubuntu to factory settings. The first one is to use it through its GUI or Graphic User Interface. The other method is to use it via the Terminal, a process you should be familiar with by now.

    Step 2. (Option 1) – Using Systemback GUI to Restore Ubuntu

    In this section, we will show you how to use the Systemback GUI to restore your Linux device. Before we dive in, let’s create a restore point.

    Step 2.1. Create a restore point

    Follow these steps to make a restore point on Ubuntu using the Systemback GUI:

    1. Open the Systemback program using the dash menu.
      Tip. You can also press the “CTRL + ALT + T” keys to open the Terminal and execute the command, “$ sudo systemback” to open the program.
    2. Once the program opens, click on the “Create new” button that is right under the “Point operations” heading.
    3. This software will now automatically create a backup of your Ubuntu Linux system at “/Home” — the default directory under the software.
      Note. You can always change the location using the “Storage directory” box in the upper-right corner of the Systemback menu.
    4. It might take a while to create a restore point, which will depend on each individual device and the number of files you’re creating a backup of.
    5. Once you’re done with creating a backup file, you can find it under the “Restore points” of the Systemback menu.

    Please note: You can always choose to exclude one or multiple files of your choice from the system backup you create using the method above. To do that, you must click the “Exclude” button of the “Function menu” heading of the Systemback software.

    Step 2.2. Restore Ubuntu to factory settings

    Once you’re done with creating a restore point successfully, it’s time to restore your Ubuntu device to factory settings. Follow the steps below to revert Ubuntu to factory settings –

    1. As you have already created a restore point, it will reflect on one of the boxes under the “Highlighted restore points” option.
      Tip. If you have multiple restore points, you need to check the box of your desired restore point to proceed to the next step.
    2. Once you have selected the restore point of your choice, click on the “System Restore” button underneath the “Function menu” option. This action will open a new “System restore” window.
    3. In the “System Restore” window, pick one of these three options:
      1. Full restore — This option will restore the complete backup of the system.
      2. System files restore — This will only retrieve your Linux system.
      3. User(s) configuration files restore — This option will only recover the configuration files.

      Step 2. (Option 2) – Using Systemback via Terminal to Restore Ubuntu

      Just like the Systemback GUI, you can also use the software via Terminal to recover your device running this Debian-based system. Before we proceed, we will assume you have already created a restore point as a data backup using method 1 under Systemback GUI we have mentioned above. Once that’s done, it’s time to restore your Linux system using the steps below:

      1. Press the “Ctrl + Alt + T” keys on your keyboard to open the “Terminal.”
      2. Once the terminal opens, type “$ sudo systemback-cli” and press the “Enter” key. This will open the main screen showing the available restore points.
      3. If you have created just one restore point, this will show after the letter “B.” If you have multiple restore points, it will show multiple letters and their respective restore points. In our case, we have created a single restore point, so you must type “B” on your keyboard to continue.
      4. Next, press “2” on your keyboard to select the “System Restore” option.
      5. After that, press the “2” key again to select the “System file restore” option.
      6. Once it’s done, the device will ask if you want to keep your current fstab file. Press the “Y” key to say “Yes” to it.
      7. Next, press “N” to say “No” when it asks if you want to reinstall the GRUB 2 bootloader.
      8. Finally, when it asks if you want to start restoring, press “Y.”
      9. Once the restoration process is complete, press the “Enter” key to reboot your computer.

      Once you complete the 9th step and reboot your computer, your Ubuntu device will restore its factory settings.

      Источник

      Как восстановить Ubuntu

      В создании этой статьи участвовала наша опытная команда редакторов и исследователей, которые проверили ее на точность и полноту.

      Команда контент-менеджеров wikiHow тщательно следит за работой редакторов, чтобы гарантировать соответствие каждой статьи нашим высоким стандартам качества.

      Количество просмотров этой статьи: 26 150.

      В этой статье мы расскажем вам, как восстановить операционную систему Ubuntu. Это можно сделать с помощью терминала или запустить Ubuntu в режиме восстановления и восстановить поврежденные пакеты. Если ничего не помогло, переустановите Ubuntu.

      С помощью терминала

      Изображение с названием Recover Ubuntu Step 1

      Откройте терминал. Нажмите на значок в виде черного прямоугольника с белыми символами в левом верхнем углу.

      Изображение с названием Recover Ubuntu Step 2

      Введите команду в терминале. Команда: sudo su -c «apt-get update» . Теперь нажмите Enter . Эта команда проверит наличие новых обновлений в репозитории. [1] X Источник информации

      Изображение с названием Recover Ubuntu Step 3

      Введите команду в терминале. Команда: sudo su -c «dpkg —configure -a» . Теперь нажмите Enter . Эта команда устранит проблемы с dpkg.

      Изображение с названием Recover Ubuntu Step 4

      Введите команду в терминале. Команда: sudo su -c «apt-get -f install» . Теперь нажмите Enter . Эта команда правильно настроит зависимости. [2] X Источник информации

      Изображение с названием Recover Ubuntu Step 5

      С помощью режима восстановления

      Изображение с названием Recover Ubuntu Step 6

      Перезагрузите Ubuntu. Сделайте это, чтобы получить доступ к меню GRUB. Чтобы перезапустить Ubuntu, щелкните по значку в виде шестеренки в левом верхнем углу, а затем в меню выберите «Выключить».

      Изображение с названием Recover Ubuntu Step 7

      Нажмите и удерживайте ⇧ Shift , когда компьютер уйдет на перезагрузку. На экране появится меню GRUB.

      Изображение с названием Recover Ubuntu Step 8

      Выберите Advanced Options for Ubuntu (Дополнительные параметры Ubuntu). Это вторая опция в меню GRUB.

      Изображение с названием Recover Ubuntu Step 9

      Выберите Ubuntu, with Linux x.xx.x 32 generic (recovery mode) (Ubuntu с Linux x.xx.x 32 (режим восстановления). Ubuntu запустится в режиме восстановления.

      Изображение с названием Recover Ubuntu Step 10

      • Если проблема не устранена, возможно, вам придется переустановить Ubuntu. Помните, что это приведет к удалению всех данных на диске. Прочитайте эту статью, чтобы узнать, как установить Ubuntu.

      Дополнительные статьи

      взломать WPA/WPA2 ключ от Wi–Fi с помощью Kali Linux

      стать суперпользователем в Linux

      заархивировать папку в Linux

      проверить IP адрес в Linux

      добавить или сменить шлюз по умолчанию в Linux

      использовать Wine в Linux

      установить Ubuntu в VirtualBox

      назначить IP адрес в Linux

      создать и отредактировать текстовый файл с помощью терминала в Linux

      отформатировать жесткий диск в Ubuntu

      отформатировать флешку в Ubuntu

      установить Tor в Linux

      Об этой статье

      В создании этой статьи участвовала наша опытная команда редакторов и исследователей, которые проверили ее на точность и полноту.

      Команда контент-менеджеров wikiHow тщательно следит за работой редакторов, чтобы гарантировать соответствие каждой статьи нашим высоким стандартам качества. Количество просмотров этой статьи: 26 150.

      Источник

Оцените статью
Adblock
detector