Questions: How can I backup and restore Ubuntu?, How to backup and restore Debian?, How to backup and restore Linux Mint using Timeshift?. Are you looking for a way to create system snapshots on Ubuntu, Debian, and Linux Mint Linux distribution?. Snapshots allow you to restore your entire operating system to a point in time state. This comes in handy whene you experience system failure or sluggish behavior.
In this blog post, I’ll show you how you can easily create system snapshots on Ubuntu, Linux Mint and Debian Linux system using Timeshift.
What is Timeshift?
Timeshift is an open source tool for creating filesystem snapshots using rsync+hardlinks or BTRFS snapshots. It has support for scheduled snapshots, multiple backup levels, and exclude filters. Once you have a snapshot taken, it can be restored while the system is in a running state or from Live CD/USB.
Install Timeshift on Ubuntu / Debian / Linux Mint
Now that you have some basics about Timeshift, let’s change gear to the installation bit. We’re going to install Timeshift on Ubuntu / Debian from the official OS repositories.
sudo apt update
sudo apt install -y timeshift
Create System Snapshots using Timeshift
You’ll need to save your snapshots in a separate partition. So before I can start Timeshift application, I’ll configure disk and partition used for saving Snapshots. I have a secondary disk /dev/sdb
on my machine.
# lsblk
sdb 8:16 0 10G 0 disk
I’ll create a partition table and filesystem on this block device.
$ sudo parted /dev/sdX mklabel gpt $ sudo parted /dev/sdX mkpart primary 0% 100% $ sudo mkfs.ext4 /dev/sdX1 mke2fs 1.44.1 (24-Mar-2018) Creating filesystem with 2620928 4k blocks and 655360 inodes Filesystem UUID: 56a691be-3476-4bab-be9f-13fcdf5458bb Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done
Once done, Launch Timeshift from terminal or Applications search menu.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 1 install timeshift backup ubuntu debian mint 01](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-01-1.webp)
Provide sudo password when prompted.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 2 install timeshift backup ubuntu debian mint 02](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-02-1.webp)
Select Snapshot type.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 3 install timeshift backup ubuntu debian mint 03](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-03-1.webp)
Select location where snapshots should be saved.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 4 install timeshift backup ubuntu debian mint 04](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-04-1.webp)
Select Snapshot Levels
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 5 install timeshift backup ubuntu debian mint 05](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-05-1.webp)
You can choose to use your desired backup options that you see fit for your use case.
eate the first Snapshot manually by clicking on the “Create” button at the top menu.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 6 install timeshift backup ubuntu debian mint 07](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-07-1.webp)
Restoring System from Snapshot using Timeshift
To revert your system to Snapshot state, select the Snapshot you want to restore to and click the “Restore” tab on the top menu.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 7 install timeshift backup ubuntu debian mint 08](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-08-1.webp)
This will ask you to “Select target device” and options for /boot
/home
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 8 install timeshift backup ubuntu debian mint 09](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-09-1.webp)
Timeshift will Perform Dry run before doing the actual restore.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 9 install timeshift backup ubuntu debian mint 10](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-10-1.webp)
Confirm Actions to initiate Snapshot restore process.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 10 install timeshift backup ubuntu debian mint 11](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-11-1.webp)
Timeshift will start to sync Snapshot files to the root filesystem.
![Backup and Restore Ubuntu / Debian / Linux Mint using Timeshift 11 install timeshift backup ubuntu debian mint 12](https://neveropen.co.za/wp-content/uploads/2023/09/install-timeshift-backup-ubuntu-debian-mint-12-1.webp)
The system should reboot after the process is completed.
Wrapping up
Timeshift brings the System Restore feature in Windows or the Time Machine tool in macOS to Linux. It is the existence of such tools that propel Linux adoption in Desktop world to the next level. Follow us and subscribe to our newsletter to receive latest updates.
Other Backup guides:
- Best secure Backup Application for Linux, macOS & Windows
- Backup MySQL databases to Amazon S3
- How to Backup and Restore RabbitMQ Data & Configurations
- How to Install Nakivo VMware Backup & Replication tool on Linux