In this digital world we all have some important data stored on our hard disk drive without any backup, may be professional or private. Even though if you are using Linux, the stated ‘Most secure Operating System’, the data present on your hard disk is still not safe. There are many threats to your all files like
So, whatever may be the reason, it is always better to have entire backup of your hard disk. God forbid, if anything above happens to your PC/laptop and everything stored on your device loses then by restoring the backup, you can get back to your work within minutes with no loss of any data, saving you from guilt and grief of losing your entire life’s work. Hence here are the 4 ways you can follow to backup your whole HDD on Linux operating system.
In Linux operating system, dd or “Disk Destroyer” is the most powerful tool because but if we do not handle it carefully, this tool can completely delete the whole storage of your hard drive.
You can find this tool free built-in most Linux operating system, but if not, open package manager and install it. Open terminal window, after opening it, with the help of lsblk command,
Now for backing up the hard drive enter this command and wait
dd if=/dev/sdA of=/dev/sdB bs=64K conv=noerror,sync
Where sdA is the disc you want to backup and sdB is the address of the drive where the system will hold the backup.
The bs in the above line stands for block size, which means the size of the data block by which transfer of data takes place. 512 bytes is the default value. Since this value is very small, it is better to write 64 K or 128 K as the condition. Bigger value helps in transferring data at a higher rate while smaller value of bs gives more accurate data.
For cloning a particular part of your hard disc drive, use the following command.
dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync
Image source: Google
Here sda1 the part of the hard drive sda which will be copied to a new partition sdb1 of an external or secondary hard drive sdb present on your computer. Now run the command. Wait until the backup is complete.
The shortest way to backup your entire hard drive on Linux is with the help of TAR. It does not make a copy or image of the whole drive rather it compresses the ditto copy of whole filesystem of Linux operating system into TAR archive. To do the entire backup of disk drive, follow the steps:
Of all the methods to backup hard disc drive on Linux, this is the most user friendly way because in this method one don’t have to deal with command line programs, live disks or anything like that. Gnome disc utility is a tool that is available with most distributions of Linux. Or if you are already using Gnome, there is high chance that this tool is already present in your PC. But if that’s not the case you can always install it by searching ‘gnome-disk-utility’ under Linux distribution package manager.
It is very basic and self explanatory. It basically creates the copy of the hard disc which the user select to backup and save in the form of raw .IMG file. Now, before you start backing up there is one thing that should be kept in mind that there must be enough space to store the backup files in the hard drive. Because if the drive is, say 750GB big, then the image file of the disc would also be 750 GB .IMG file. And if the drives largest capacity is 1TB then clearly it can store 1.5 TB. So either connect one external hard drive or create the image of the storage of hard disc drive of the computer is less than half of the maximum storage. Now follow the steps to backup.
An another popular way that can help you in backup your hard drive on Linux is Clonezilla.It is basically a live CD or disc utility program that can be booted from a USB drive. It is a more advanced tool damn Gnome disc. Although both of the programs have similar features but clonezilla comes with more options and setting for advanced users. Some of the advantages of Clonezilla over Gnome disk utility are following.
Here is the method of using clonezilla for running disc to disc copy.
First of all, you have to download clonezilla. There are many choices of ISO files present. Of all this, I would prefer stable because
From the CD, after booting the ISO file, the clonezilla application will start.
These were the most popular four methods to back up hard drive disk in Linux operating system. Hope this helps.