Tuesday, October 7, 2008
Archiving Important Data
One important job that doesn't always get the attention it deserves is the archiving of data. Even though I've told people many times to back up their files once a week this usually isn't done. But in the case of irreplaceable data merely copying your files to DVD may not be enough.
Let's consider the parchive utility. For Linux purposes you can find the source here. When you have very important files, you don't want to just copy those files to a DVD. A DVD could become scratched or degraded due to bitrot so a bit of extra protection is nice to have. Here is an example of using the par2 utility to backup all the files in the current directory to a par archive called "test":
par2 c -r10 test *
In the case above we are specifying a level of redundancy of 10%. It seems that if you use an asterisk to represent all the files in the current directory there can be no subdirectories underneath otherwise this example will not work. In this case it is recommended to use the tar utility first:
tar -zcvf test.tar.gz *
then proceed with:
par2 c -r10 test.tar.gz
The result will be a series of files something like this:
test.tar.gz.par2
test.tar.gz.vol000+01.par2
test.tar.gz.vol001+02.par2
test.tar.gz.vol003+04.par2
test.tar.gz.vol007+08.par2
test.tar.gz.vol015+16.par2
test.tar.gz.vol031+32.par2
test.tar.gz.vol063+64.par2
test.tar.gz.vol127+73.par2
Using the tar utility has the added benefit of storing metadata such as the owner and permissions of the files.
Finally the files can be archived to some optical disc format. I usually use k3b for this purpose.
Let's consider the parchive utility. For Linux purposes you can find the source here. When you have very important files, you don't want to just copy those files to a DVD. A DVD could become scratched or degraded due to bitrot so a bit of extra protection is nice to have. Here is an example of using the par2 utility to backup all the files in the current directory to a par archive called "test":
par2 c -r10 test *
In the case above we are specifying a level of redundancy of 10%. It seems that if you use an asterisk to represent all the files in the current directory there can be no subdirectories underneath otherwise this example will not work. In this case it is recommended to use the tar utility first:
tar -zcvf test.tar.gz *
then proceed with:
par2 c -r10 test.tar.gz
The result will be a series of files something like this:
test.tar.gz.par2
test.tar.gz.vol000+01.par2
test.tar.gz.vol001+02.par2
test.tar.gz.vol003+04.par2
test.tar.gz.vol007+08.par2
test.tar.gz.vol015+16.par2
test.tar.gz.vol031+32.par2
test.tar.gz.vol063+64.par2
test.tar.gz.vol127+73.par2
Using the tar utility has the added benefit of storing metadata such as the owner and permissions of the files.
Finally the files can be archived to some optical disc format. I usually use k3b for this purpose.
Subscribe to Posts [Atom]
Post a Comment