0

I am taking NFS backup using following way.

tar -b 1024 -cf - . | /bin/gzip -c | /bin/dd bs=10M oflag=direct,sync of=/nfs

But I read it somewhere that to throttle the rate of I/O reading the data to match NFS WRITE rate, to use

rsync --bwlimit=10M -az -P -H . /nfs

I want to know which one is efficient out of these 2 to write a big chunk of file into NFS mounted path.

1
  • 2
    Would they not do two completely different things though? The tar pipeline writes an archive to the file /nfs, while rsync writes several to beneath /nfs. Also the first is using a specific block size at an unspecified speed, while the second is using an unspecified block size at a specified speed. What is it that you want to achieve?
    – Kusalananda
    Commented Dec 24, 2019 at 7:00

1 Answer 1

0

rsync would be the better choice. Throttling is only necessary if you don't want to congest the network.

The advantage of using rsync is that it will be faster to recover if something goes wrong during the backup. (With the 1st method you'll have to start from the beginning again)

2
  • 1
    That's an interesting call. The tar pipe will write less data to the NFS share; perhaps that's "more efficient"? We don't know, because the OP is comparing apples and pears. Commented Dec 24, 2019 at 15:16
  • True. I should mention that I answered this question by making an assumption about what he actually wants to do. (But I'm pretty sure that I assumed this correctly)
    – Garo
    Commented Dec 24, 2019 at 15:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .