Archiving data files to DVD

IBM has been using Lotus Notes as its email platform for the last 14 years or so, and during those years I’ve seen the size of emails increasing dramatically, mostly due to the ease with which people can attach large (and often unnecessary) attachments. IBM meanwhile would like us to minimise the size of our mail databases to minimise the cost of storing all this email across the corporation. However, at the same time, keeping many of these emails so they can be referred back to is very useful. Consequently I’ve been archiving all my email from my mail database to my local mail archive database. Unfortunately, the larger that database has become, the slower it becomes for certain classes of operation, such as opening or searching it. The actual file that represents that database also starts to become very unwieldy for the operating system; my email archive database was nearing 6GB in size.

I recently decided to do something about it, and split that single large mail archive database into a series of smaller archives, each covering a two year period, limiting the size of each to a GB or less.

I currently back these up to my NAS, but I’d like to have extra copies somewhere less accident-prone than spinning media. A couple of sets of DVD’s, preferably stored “offsite” from where my NAS and laptop are kept (ie, at work, not at home) seems like a good extra insurance policy. Which leads me to the question of how to burn some very large files to DVD under Linux.

It turns out that Ubuntu comes with dvd+rw-tools already installed, which provides command line utilities to do everything that is required.

dvd+rw-format -force /dev/dvdrw Formats the DVD-RW, allowing it to be used. Doing this too often can seriously shorten the life of your DVD-RW media, and it isn’t necessary to format before each reuse – just overwrite the old contents with new data.

growisofs -Z /dev/dvdrw -R -J /etc/*.conf Initialises and writes an initial set of files to the DVD-RW. If there is already data on your DVD-RW, this will overwrite it.

growisofs -M /dev/dvdrw -R -J /var/log/*.log Adds some more files to the DVD-RW. On a DVD-R I believe this will create another session, and write the data into that.

Note that with DVD-R media you skip the formatting step, then use the same growisofs commands as with DVD-RW media, EXCEPT it appears that you can’t easily add files to an existing DVD-R without creating a multisession DVD-R, which looks like it could be a heap of pain. I figure it’s probably best to just save all the required files in a single write.

For maximum compatibility, close the DVD-RW off with growisofs -M /dev/dvdrw=/dev/zero once all the files have been written to it, and just for completeness, it’s possible to get detailed technical information on the contents of any optical disc, by using the command dvd+rw-mediainfo /dev/dvdrw

Note that in all cases, these commands must be run by a “normal” (non-root, non-sudo) user, and the DVD media must be unmounted at the time.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s