Tar backup of a filesystem is much larger than the original due to sparse files in Red Hat Enterprise Linux.

Solution Verified - Updated -

Issue

  • Creating a tarball of data over the network, created files which were higher in size than the source.

  • Backup of a filesystem was done over the network using tar and netcat. This was for a physical machine to virtual migration. The application filesystem was sized exactly the same on both, however, the data copied to the VM was much larger than the original.

  • The command used was as following :

# cd /; tar -cpf - `ls -a | egrep -v "^\.\$|^\.\.\$|proc|sys|lost\+found" ` | nc 192.168.5.40 9100

Environment

  • Red Hat Enterprise Linux (RHEL) 4, 5, 6, 7, 8, 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content