Ubuntu

How to backup and restore Ubuntu with TimeShift

How to backup and restore Ubuntu with TimeShift

That's one of the basic rules of using any operating system or internet in general. If you are using any modern devices, the chances are that they can break or become unusable. Linux is no different.

There can be an instance where you installed a package that made your Linux installation go haywire. In short, things can go wrong, and so you should always do backups.

Like Windows, Ubuntu also comes equipped with a backup feature called TimeShift. Its working is similar to that of System Restore in Windows or TimeMachine on macOS.

Timeshift is a free-to-use tool that lets you take backup system settings and files. By protecting these critical files, you can always restore them if something goes wrong. However, the tool is not there to protect your files, including pictures, music, and documents.

Installing Timeshift

The first step that we are going to take is to install Timeshift. Installing it is very easy. All you need to do is download it through the Debian and Ubuntu repositories.

To add the repository, type the command in the terminal.

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

Adding repository

Next, run the apt update to update the system packages.

sudo apt update

Once everything is done, it is now time to install Timeshift.

sudo apt install timeshift

Installing Timeshift

Learning about Timeshift

Timeshift offers two modes when it comes to creating incremental filesystem snapshots - rysnc+hardlinks and BTRFS snapshots.

The main difference between the two backup modes is how they create and store the backup. For instance, BTRFS Mode, it utilizes the inbuilt features of the BTRFS filesystem. If BTRFS mode is used, then the created snapshots should only be supported on systems with the Ubuntu-type subvolume layout.

The RSYNC mode creates backups with the help of hard-links and rysnc. In this case, each of the snapshots is full backups. These backups can easily be browsed using file managers as well. Also, if you create multiple RSYNC mode, then the backups save disk space by skipping the same files.

When you open Timeshift, you should be asked to select the snapshot type. There is also a help section where the setup wizard tells you about each snapshot type.

Opening Timeshift for the first time - setup wizard

It then asks you to select the snapshot location. You can also cancel the wizard and do all of these things later.

Creating a backup

To create a backup, you need to click on create, as shown below.

Creating a snapshot using Timeshift

Next, it asks you about the snapshot levels. These levels are used to determine how often the system should take snapshots.

Selecting-snapshot-levels

Now click on Finish to start the process. Once done, it should begin to create a snapshot. And, it should get listed under the snapshot window.

Restoring a snapshot

Restoring a snapshot is as simple as creating it. To get started, you need to select the snapshot from the list of snapshots and then click “restore.”

Once done, the restore snapshot window should open where it should ask you where you want the files to be restored. Once the location is set, click on next to start the dry run. In the dry run, Timeshift compares data with rysnc and verifies the files and directory.

Next, it should ask you to confirm the actions. Finally, it shows the disclaimer, and as soon as you click the “next” button, the restoration process should start.

It should take some time for it to get completed. Please be patient.

Conclusion

It is imperative to back up your files often. By using Timeshift, you get the peace of mind that you have the restore option when the disaster strikes on your Linux system. Using TimeShift is an easy way to create snapshots and restore them when needed.

Viisi parasta pelin kaappauskorttia
Olemme kaikki nähneet ja rakastaneet suoratoistopelejä YouTubessa. PewDiePie, Jakesepticye ja Markiplier ovat vain joitain huippupelaajista, jotka ova...
How to Develop a Game on Linux
A decade ago, not many Linux users would predict that their favorite operating system would one day be a popular gaming platform for commercial video ...
Open Source Ports of Commercial Game Engines
Free, open source and cross-platform game engine recreations can be used to play old as well as some of the fairly recent game titles. This article wi...