How To Backup Ext2, Ext3, or Ext4 File Systems In Linux [Updated]

How To Backup Ext2, Ext3, or Ext4 File Systems In Linux [Updated]

How to backup Ext2, Ext3, or Ext4 file systems in Linux

In this tutorial, we will show you the steps to take backup of Ext2, Ext3, or Ext4 file systems in Linux-based operating systems. You should be cautious while taking the backup of the Ext2, Ext3, or Ext4 file systems in Linux as the operating system that you are currently using is mounted on the file system on Linux which you won’t be able to copy in active mode. In this post, we will see how to backup Ext2, Ext3, or Ext4 file systems in Linux.

How To Backup Ext2, Ext3, or Ext4 File Systems In Linux [Updated]

We will be using a third-party tool to backup the file systems in Linux. The backup tool that we are going to use in this post is the Dump tool. it allows the users to backup the running Linux files system in another drive.  The Dump tool can backup, record, restore, and partial backup files on Linux.

Run the following command to install the dump tool in Ubuntu and its derivatives.

sudo apt-get install dump

Run the following command to install the dump tool in Red Hat and Fedora Linux

sudo yum install dump

Run the following command to install the dump tool in Arch Linux

sudo pacman -S dump

Run the following command to install the dump tool in SUSE Linux

sudo zypper install dump  

Dump command to backup Ext2, Ext3, or Ext4 file systems in Linux

sudo dump -0uf /my_backup_directoryname/sda1.dump /dev/sda1 ( This will the take backup of sda1)
sudo dump -0uf /my_backup_directoryname/sda2.dump /dev/sda2 (This will the take backup of sda2)
sudo dump -0uf /my_backup_directoryname/sda3.dump /dev/sda3 (This will the take backup of sda3)
udo dump -0f /my_backup_directoryname/boot.0 /boot ( This will take the backup of /boot file system on Linux ) 

Dump command to take the partial backup of File Systems

Command to take the partial backup of Linux file systems.

sudo dump -0f /my_backup_directoryname/configurations.dump /etc/default /etc/network

How To Restore the Linux File Systems From Backup

Run the following command to restore the file systems from the backup file.

sudo restore -xf /my_backup_directoryname/configurations.dump
READ More Relevant Stuff:  Best Command Line Music Players For Linux

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

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