
–info=progress2 outputs statistics based on the whole transfer, rather than individual files.It’s notably needed for backups of jailed systems (BSD jails, OpenVZ, VServer, LXC) that appear to have bogus IDs when seen from their host system because they have their own ID maps. –numeric-ids uses numeric IDs instead of trying to map them.-S tries to handle sparse files efficiently so that they take up less space on the destination.-X updates the destination extended attributes to be the same as the source ones.It’s a convenient way to boost speed when both the source and destination are local paths. -W disables the delta-transfer algorithm used to reduce network usage.-x doesn’t cross filesystem boundaries.
#Disk copy fast software archive
-a is the archive mode: it recurses into directories, copies symlinks as symlinks, and preserves permissions, owner, group, modification times, device files, and special files. Otherwise, rsync will copy the parent directory instead of that directory’s content. Let’s be careful to include the final slash in /mnt/sourcePart/. # rsync -axHAWXS -numeric-ids -info=progress2 /mnt/sourcePart/ /mnt/destPart If the machines use static IPs instead of DHCP, let’s remember to change the network card configuration of the cloned machine. Since file-level cloning doesn’t clone the MBR, so we also need to reinstall Grub. For instance, cloning from ext4 to fat32 causes the loss of many features.Īfter the cloning, we have to modify /etc/fstab according to the new partitioning. The destination file system has to support all the functionalities of the source file system otherwise, we can get unexpected side effects. Cloning the swap partition or the swap file is always superfluous.įile-level cloning can convert between file systems – for instance, an ext3 file system to an ext4. We must preserve permissions, keep file types, and avoid copying virtual pseudo file systems ( /dev, /proc, and /sys). In many cases, /boot is on a small partition, so after cloning the root directory, we’ll have to run rsync a second time to clone /boot. If the source file system hierarchy includes mount points on different partitions, we should clone them separately. This fact implies that if the destination disk is empty, we must create the GPT partition table and partition it. We must use that live Linux system to mount both the source and destination partitions. Since cloning a running system can cause unpredictable failures and side effects, a live Linux system not installed on the source or destination drives is necessary to execute the cloning safely. Migrating an Operating System From One File System to Another Using rsyncīefore we look in detail at the rsync options to use, there are some guidelines we should keep in mind.
On the other hand, if we need to manipulate partitions from the command line, we can consult our “ Partitioning Disks in Linux” guide. The easiest way to manage partitions with Linux is GParted, a graphical partition editor usually included on many live CDs/DVDs. A simple situation is where we have an ext4 formatted primary partition, with the boot flag, on which we mount the root directory, and another primary partition formatted as swap. The extended partition can contain multiple logical partitions. A primary partition contains one file system. We can see the list of all UUIDs with blkid.Įach disk can have at most four primary partitions, or three primary partitions and an extended partition. The standard partition table is GPT (GUID Partition Table).Įach partition has a UUID (Universally Unique Identifier), helpful in identifying them in /etc/fstab when other factors used to locate them might change. The disk stores the information about the partitions’ locations and sizes in an area known as the partition table. Disk partitioning is the creation of one or more parts on a disk so that we can manage each of them separately.