Easiest way to backup your disks in linux

Easiest way to backup your disks in linux

Doing backups is a must. If you don't do that, you might loose all your important data.

I've tried many ways to do my backups - R-Drive Image utility, CloneZilla, etc.

But, as it turns out, the most simple things are the best:

all you need to do, is just run some live linux distribution, such as gparted live, which you can easily get on your USB stick. https://gparted.org/liveusb.php

DISCLAIMER OF LIABILITY: we specifically DISCLAIMS LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES and assumes no responsibility or liability for any loss or damage suffered by any person as a result of the use or misuse of any of the information or content on this website. We assume or undertake NO LIABILITY for any loss or damage suffered as a result of the use, misuse or reliance on the information and content on this website.

I'm using external disk to store my backups.

You need to find which device is your external disk using:

sudo fdisk -l

Based on capacity of media, we know that external HD is represented by: /dev/sdc disk. (5,5 TiB)

This command lists that there's usable partition on this disk represented by: /dev/sdc2

so now, let's mount it:

mkdir mydisk
sudo mount /dev/sdc2 mydisk
cd mydisk

Doing backup

Now, let's do a full backup of 500GiB disk to external 5.5TB disk into file sda.img

sudo dd if=/dev/sda | gzip -c > sda.img

This process takes approximately an hour / based on your source disk size and speed of external drive. I'm usually doing it overnight.


To restore your backup (warning: all data on your source disk will be lost!):

sudo gunzip -c sda.img | sudo dd of=/dev/sda status=progress

This process displays progress of restore operation. It's completed, when progress reaches capacity of the source disk (500 GiB).

Related Posts