Advance

Tutorial Create Backup and Restore on Ubuntu 20.04

Tutorial Create Backup and Restore on Ubuntu 20.04

Ubuntu is a relatively secure Linux distribution, but you can’t protect against data loss. There is always a possibility that you might make a mistake or have a hardware problem and lose your valuable data. That’s why it’s important to back up regularly. This article will teach you How to Create a Backup and Restore on Ubuntu 20.04. Eldernode offers an economically Ubuntu VPS Server, which you can check out the offered package to purchase it.

How to Create Backup and Restore on Ubuntu

There’s always the possibility to lose valuable data and creating a backup copy of important files is always a good idea, as it can help you recover your data in the event of a system crash or accidental deletion. Backing up in Ubuntu is quick and easy. Follow the steps below to create a backup and restore it in Ubuntu 20.04.

Recommended Article: How to Install and Configure oVirt on Ubuntu 20.04

Creating Backup on Ubuntu 20.04

In this step, you will learn how to create a backup and restore on Ubuntu 20.04 using the Timeshift command line.

Firstly, you can create a first backup simply with the following command:

sudo timeshift --create

This will create a new configuration file at /etc/timeshift.json location.

The output should be as follows:

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 '2023-05-04_15-30-37': ondemand

To list all your currently created system backup screenshots, run the command below:

sudo timeshift --list

The output should look something like this:

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    >  2023-05-04_15-30-37 O

Restoring on Ubuntu 20.04

You can restore from the backup snapshot using the following command:

sudo timeshift --restore --snapshot "2023-05-04_15-30-37"

If you want to delete the selected backup snapshot, run the command below:

sudo timeshift --delete --snapshot '2023-05-04_15-30-37'

That’s it!

Recommended Article: Tutorial Install the Latest phpMyAdmin on Ubuntu 20.04 Linux

Conclusion

If you want to protect against data loss, you should create a backup copy of important files. I hope you found this tutorial useful and that it helps you create a backup and restore your Ubuntu VPS server. You can contact us in the Comments section if you have any questions or problems during the process.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day