Sunday, December 28, 2008

Par2 Backups

http://thecootsconnection.blogspot.com/2008/09/missive-missile-from-pete.html <- Note the second video http://www.motivatedphotos.com/?id=3352

http://www.instructables.com/id/Measure-the-drag-coefficient-of-your-car/

http://www.smbc-comics.com/index.php?db=comics&id=498

http://www.smbc-comics.com/index.php?db=comics&id=490

http://www.smbc-comics.com/index.php?db=comics&id=458

http://www.smbc-comics.com/index.php?db=comics&id=410

http://www.itvnews.tv/Blog/Blog/best-50-astronomy-pictures-of-year-2008.html


So I wanted to find a program that could make a parity for files. I already have most of my stuff on multiple hard drives, but I like to burn it to dvd every once in a while. My first thought was to do something like RAID 1 on dvd where I'd burn it to 2 dvds and any errors be fixed with the other. There turned out to be no easy way to do this, so instead I found a program called par2 which can build parities for files. At first I found it rather confusing, but now I rather like it. It claims to support multiple files, but I can't figure out how to make it work on a whole directory at once, it seems to want me to list every file indivdually, there must be some way to do it. Either way I found it easy to just compress everything first as a .7z archive, then build the parity for that. Here's how it works, you give it a command like par2 create test.mpg, and you get:
test.mpg.par2 - This is an index file for verification only
test.mpg.vol00+01.par2 - Recovery file with 1 recovery block
test.mpg.vol01+02.par2 - Recovery file with 2 recovery blocks
test.mpg.vol03+04.par2 - Recovery file with 4 recovery blocks
test.mpg.vol07+08.par2 - Recovery file with 8 recovery blocks
test.mpg.vol15+16.par2 - Recovery file with 16 recovery blocks
test.mpg.vol31+32.par2 - Recovery file with 32 recovery blocks
test.mpg.vol63+37.par2 - Recovery file with 37 recovery blocks

At first I didn't get this block concept, but as it turns out a block is just 1/1000th of a file. So if you had 1 block of parity data you could repair a file that was up to .1% corrupt. The blocks are interchangable, so if you only needed 1 block of parity data you could use any of the above files. If you needed 15 blocks worth you could use the first 4 files togethor (1 + 2 + 4 + 8 = 15 blocks), or you could use any of the last 3 by them selves each of which would have more parity then you needed. As one last example if you needed 25 blocks worth but were missing all but files 2-5 that would work (2 + 4 + 8 + 16 = 30 > 25).

The index file is always about 40kb, and is only useful to verify the file is ok, and I think you need it to rebuild the file. To rebuild you'll need at least 1 block, and the program will tell you exactly how many you'll need. By default it only does 5% (50 blocks) worth of parity, but I went ahead and ran it at 100%. My backup .7z file is about 500megs, so I'll be able to burn it plus all the parity data to a dvd, and then store it somewhere safe. The neat thing is I'll also be able to email myself the first couple parity files so that if there is mild corruption I'll be able to recover with just them.

I tested to make sure it worked, opened the file in a hex editor and deleted about half the file. I then delted a coupld of the parity data files, leave more than half it should need, it rebuilt the file fine. I then deleted the entire orginal file, and left all the parity files, and it complety rebuilt the file from scratch. It took a little over an hour to build the 100% parity on my 500meg file.
http://www.par2.net/




In fact, they are. In a remarkable experiment, Margaret Shin, Todd Pittinsky, and Nalini Ambady asked Asian- American women to take an objective math exam. But first they divided the women into two groups. The women in one group were asked questions related to their gender. For example, they were asked about their opinions and preferences regarding coed dorms, thereby priming their thoughts for gender-related issues. The women in the second group were asked questions related to their race. These questions referred to the languages they knew, the languages they spoke at home, and their family's history in the United States, thereby prim­ing the women's thoughts for race-related issues.

The performance of the two groups differed in a way that matched the stereotypes of both women and Asian- Americans. Those who had been reminded that they were women performed worse than those who had been reminded that they were Asian-American. These results show that even our own behavior can be influenced by our stereotypes, and that activation of stereotypes can depend on our current state of mind and how we view ourselves at the moment.



A second experiment tested the same general idea by priming the concept of the elderly, using words such as Florida, bingo, and ancient. After the participants in this experiment completed the scrambled-sentence task, they left the room, thinking that they had finished the experiment—but in fact the crux of the study was just beginning. What truly interested the researchers was how long it would take the participants to walk down the hallway as they left the building. Sure enough, the participants in the experimental group were affected by the "elderly" words: their walking speed was considerably slower than that of a control group who had not been primed. And remember, the primed participants were not themselves elderly people being reminded of their frailty—they were undergraduate students at NYU.

No comments:

Post a Comment