In this tutorial we will use Timeshift to create the full system backup snapshot of Ubuntu 20.04 system. Furthermore, you will learn how to restore from your previously created backup snapshot.
In this tutorial you will learn:
- How to create full system backup snapshot
- How to restore from backup snapshot
- How to create and restore backup from the command line
Software Requirements and Conventions Used
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa |
Software | timeshift |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Ubuntu 20.04 System Backup and Restore step by step instructions
Using the following steps we will first create system backup of the Ubuntu 20.04 system using the Timeshift graphical user interface. Later we will restore from the previously created system backup snapshot.
First step is to install the Timeshift backup utility on your Ubuntu 20.04 System. To do this execute the following command:
$ sudo apt install timeshift
Create Backup by using the Timeshift GUI
Create system backup
- Open the
timeshift
application via top leftActivities
menu.
-
-
-
-
-
-
-
-
-
-
Restore from backup
Create and restore backup by using the Timeshift’s command line
- Create a first backup simply by executing the below command:
$ sudo timeshift --create First run mode (config file not found) Selected default snapshot type: RSYNC Mounted /dev/sda2 at /media/root/359151f5-efb9-483d-a738-894d57e2d8c8. Selected default snapshot device: /dev/sda2 ------------------------------------------------------------------------------ Estimating system size... Creating new snapshot...(RSYNC) Saving to device: /dev/sda2, mounted at path: /media/root/359151f5-efb9-483d-a738-894d57e2d8c8 Synching files with rsync... Created control file: /media/root/359151f5-efb9-483d-a738-894d57e2d8c8/timeshift/snapshots/2020-02-19_18-32-36/info.json RSYNC Snapshot saved successfully (39s) Tagged snapshot '2020-02-19_18-32-36': ondemand
The above command will also create a new configuration file located at the following location:
/etc/timeshift.json
. - List all your currently created system backup screenshots:
$ sudo timeshift --list Device : /dev/sda2 UUID : 359151f5-efb9-483d-a738-894d57e2d8c8 Path : /media/root/359151f5-efb9-483d-a738-894d57e2d8c8 Mode : RSYNC Device is OK 1 snapshots, 197.7 GB free Num Name Tags Description ------------------------------------------------------------------------------ 0 > 2020-02-19_18-32-36 O
- Restore from the backup snapshot:
$ sudo timeshift --restore --snapshot "2020-02-19_18-32-36"
- Delete selected backup snapshot:
$ sudo timeshift --delete --snapshot '2014-10-12_16-29-08'