UserQuestions

From PrgmrWiki

Jump to: navigation, search

See also Category:User Questions


Click here to add a question to this page


I wonder

if bots will exercise the "add question" link ...

purpose of big_blank_file?

The backup script includes this:

dd if=/dev/zero of=/tmp/xvda1/big_blank_file

rm /tmp/xvda1/big_blank_file

So what is the purpose of this?


Answer:

The dd utility copies the hard drive bit-by-bit as opposed to file-by-file. When you run dd if=/dev/zero of=/drive/blank.file it writes zeros to the partition until it fills up. When you the go to make a disk image you can compress it (due to the redundant nature of zeros) to at least the size of the data you had on it.

If you didn't do this all of your old files that you simply deleted would clog up your drive image. It wouldn't be unlikely if your 12GB partition with just 2GB of data on it needed an image 10GB in size.

Personal tools