How to backup and restore Ubuntu with TimeShift

Timeshift is a free-to-use tool that lets you take backup system settings and files. By protecting these important 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.

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
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
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-first-time
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.

create-timeshift
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.

slecting-snapshot-levels
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.

Divya Kiran Kumar
I'm the Editor of FOSS Linux. I worked as a Software Engineer before taking up blogging as my full-time job. I enjoy using Linux, and can't imagine anything else for my PC. Apart from writing for FOSS Linux, I enjoy reading non-fictional books. Sapiens was my favorite last read. I hope you enjoy reading and using this blog to enhance your Linux experience! Have a great day ahead!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,437FansLike
374FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

How to change Hostname on Ubuntu

Generally, a hostname is just an assigned name to a computer, laptop, or any other connected device to a network. You can say a hostname is a computer's nickname, and it is used to identify the machine over the network uniquely.

Manjaro vs. Ubuntu – which is better for you?

If you are a person associated with Computer technology and spend most of the time in the open-source arena, you must have heard or worked with some of the popular Linux distributions we have in the market. Some of the names that you will never miss are; Ubuntu, Arch Linux, Debian, and Mint.

9 Useful Tips Working with Operating System using Python

There are several situations when we want to work with the operating system using python. We may want to see the user details or want to do some tasks with the files and directories. If you are a system administrator, you will find it useful to work with Operating System as one can easily automate some repeating tasks of the Operating System using python.

System76 Lemur Pro Review

Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.

Top 10 New Features in Linux Kernel 5.8

Linus Torvalds recently announced the release of Linux Kernel 5.8, and he seems delighted with it. He has pointed it out as the most significant release of all time. To developers, this new kernel comes with an addition of 800,000 new code lines and more than 14,000 changed files. To the average user, you might not see many eye-candy changes, as seen in the earlier releases.

How to install Flutter on Linux

Do you want to install Flutter and start creating awesome Android and iOS applications? Then you have come to the right place. Here is a comprehensive tutorial on how to install Flutter on Linux. If you are new to Flutter, don't worry, we got that covered too as we shall go in-depth understanding of Flutter and what it brings to the table.

MUST READ

Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.
Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.

The 10 Best Linux Network Monitoring Tools

Having total control over your network is essential to prevent programs from overusing your network resources and slowing down the overall performance. This is why you should install a network monitoring tool on your system, giving you a visual overview of everything that's happening on your network. Networking Tools are like swiss-knife for the system administrators for troubleshooting system issues.

5 ways to check if a Port is open on a remote Linux PC

There is an ample number of ways to check for any open ports on a remote Linux PC. Knowing open ports on a Linux machine helps system administrators to connect to the remote PC for troubleshooting system and cloud server issues.

Scrcpy – Control Android devices from a Linux desktop

Scrcpy is a desktop program that can be used to access your Android phone's system and interface through your computer. The app is quite convenient, and some of its best features are highlighted below.

How to create a Live Linux USB drive using Etcher

In the Linux community, one thing is common between almost all of the users: trying out different Linux distributions. Most of the Linux based distributions have a great way of being tested as they provide ISO images for creating a Live USB.