I’ve recently decided to backup a bunch of files stored on my server to dvds. Since I really didn’t feel the need to install X or any sort of associated desktop I decided to attempt this all on the command line. Here’s my process:
Tar up whatever needs to be backed up into a single tar file:
tar -cvf file.tar ./dir
Next split it into dvd sized chunks. This is only needed if your tar file is greater than 4.3gib. In my case it was about 14gib. Also 4.3gib = 4.7gb, so I don’t recommend messing with the –byte parameter unless you’re using dual layer or some other media type:
split --byte=4300m file.tar filePrefix
Now there should be several files ready to burn to dvd, which you can do with:
growisofs -Z /dev/dvd -r -J -allow-limited-size ./file
Since this is for backup purposes it is a good idea to use md5sums to make sure everything is correct:
md5sum ./file; md5sum /media/dvd/file
Finally in order to restore the tar file, first copy all dvds to the same directory (again I would md5sum to make sure the copies are correct) and:
cat filePrefix* > file.tar
Untar and enjoy! Now this isn’t the most convenient way of storing backups. I’d like to be able to browse the files on the dvd, but it seemed like too much work to figure out good spots to stop copying the file system onto the dvds. For now this will do, should my disk drive start failing I should have a great starting point to recover from.
So there’s about a billion ways to do backups; I tried cataloging just the ones available in Ubuntu in this post.
One thing you might look at is a package called gaffitter:
Description: File subsets extractor based on genetic algorithms
Genetic Algorithm File Fitter (gaffitter) is a command-line software
written in C++ that extracts –via genetic algorithm– subsets of an
input list of files/directories that best fit the given volume size
(target), such as CD, DVD and others
It should fit nicely into your already existing setup. You should also be able to pipe all of these steps together, so that it needs to hit disk less often.
Also, <tt> ftl.
gafitter looks like a perfect tool for some of my backups and answers the need for a copy of the file system on dvds(especially with –split), so thanks for that tip. I decided not to go with a more complicated backup program, instead opting for tar since I don’t expect to burn dvd backups very often. Also part of my goal was to make it as easy as possible to restore the backups (cat and tar being basic tools installed in all linux distributions)
They’re <code> tags btw, what is wrong with them?
The comment system stripped out my tt tags for the package description =(
Lets see if code tags work as advertised.
Description: File subsets extractor based on genetic algorithmsGenetic Algorithm File Fitter (gaffitter) is a command-line software
written in C++ that extracts –via genetic algorithm– subsets of an
input list of files/directories that best fit the given volume size
(target), such as CD, DVD and others
OMGs This totally doesn’t work in Windows. WTF mate?