![]() First we run partclone with the extension related to the filesystem we are interested in, ext4. All we have to run is: # partclone.ext4 -c -s /dev/fingolfin_vg/home_snap_lv -o /mnt/data/backup.pcl It is formatted with an ext4 filesystem and it’s called home_snap_lv. I’m going to backup a snapshot made from the logical volume I use as /home partition. If you use an lvm partitioned system, we are not subject to this restriction, since we can create a live snapshot of a logical volume and run partclone on it, preserving uptime. Therefore if you want to backup a system partition, you must access the drive from a live cd (this is what clonezilla does). ![]() First and foremost, we must remember that to clone a partition, it must not be mounted. On Archlinux, we can install partclone via pacman: # pacman -S partclone Cloning a partitionĮnough words, let’s see partclone in action. # yum install Īfter the repository is enabled, we just need to use yum to install the partclone package: # yum install partclone First we have to download the epel-release package from the project page, then we should install the retrieved package: $ wget CentOS has the epel-release package available in the official repositories, therefore to enable this software source, we just have to run: # yum install epel-releaseĮnabling the EPEL repository on Rhel requires an extra step. On CentOS and Rhel we should first enable the EPEL software source (Extra Package for Enterprise Linux). To install it on Fedora: # dnf install partclone To install it in Ubuntu or Debian, we can use apt: # apt-get update & apt-get install partclone Partclone should be availble in the most common distributions repositories. Furthermore, if some specific filesystem is not supported by partclone, partclone.dd can be used. For example, to backup an ext2 filesytem, we will use the parclone.ext2 command. The filesystem to backup will determine the suffix to use with the program, following the syntax partclone. Partclone supports all the most used filesystems like: ext2, ext3, ext4, hfs+, reiserfs, xfs, jfs, ntfs, fat(12/16/32), exfat, etc. The fact that partclone operates at block level gives us the advantage of not having to worry about preserving specific file permissions like acls or selinux labels. Partclone behavior is different, since it can smartly interact with the most common filesystem types, backing up only the used blocks of a partition, obtaining much smaller backups. ![]() The program just replicates each block of a disk or partition, creating a 1:1 perfect clone (a 160GiB disk, will produce a 160Gib backup). We all know and love dd, but one of the characteristics that make this programs great in some situations, represents also a weakness in other ones: dd knows nothing about filesystems. The former is the level at which partclone operates. In this tutorial we will learn how to use partclone from command line.Ī backup can happen at file level, or at a deeper block level. Unlike other tools like dd, partclone knows how to interact with specific filesystems, therefore it can create much smaller backups, cloning only the used space in the partition. If you ever used Clonezilla to create a backup of your operating system, you have already experienced the power of the partclone. $ – requires given linux commands to be executed as a regular non-privileged user.# – requires given linux commands to be executed with root privileges eitherĭirectly as a root user or by use of sudo command.Learning how to use the partclone utility to backup a partition Requirements
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |