DVD Backup With Linux

If you are part of a company the chances are that you have either set up or are aware of a backup policy for your data. However, even if you are not then you might have the need to backup certain items to a DVD drive.

DVD burning is accomplished in Linux by using the mkisofs and growisofs programs. This can be run in either a two stage or a single stage process. The mkisofs program is used to create an iso file that is then written to the DVD using the growisofs program. The following will take three files and create an iso called toburn.iso, this will then be used to write the data to the DVD.

mkisofs -J -R -pad -o toburn.iso text.txt accounts.csv secret.txt
growisofs -Z /dev/hdc=toburn.iso -speed=2

The growisofs program can act as a wrapper for mkisofs and so the mkisofs step can be left out, as long as the destination directory and files are given. The -Z and -speed parameters are only used in the growisofs program, every other parameter is passed onto mkisofs.

growisofs -J -R -Z /dev/hdc -speed=2 text.txt accounts.csv secret.txt

To write more than one directory to the DVD you need to define the directories like this.

growisofs -J -R -Z /dev/hdc -speed=2 -graft-points /directory1=/home/user/directory1 /directory2=/home/user/directory2

The DVD will now contain directory1 and directory2. If this is not done then the DVD would mix up any directories that have the same name.

You can also use the -dvd-compat parameter with growisofs to improve the compatibility of the media with other DVD drives. With DVD+R and DVD-R this results in a closed disk, with DVD+RW the lead-out section is explicitly burnt to the disk.

Of course, if you are writing a piece of software or creating a movie then you might want to burn a large number of DVDs in one go, if this is the case then you might be better off using some sort of DVD replication service. This saves you the time and effort of burning the DVDs and applying the labels.

Comments

thanks for the info, very useful!
Permalink

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
2 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.