13.5 Backups to Non-Traditional Media

13.5 Backups to Non-Traditional Media

Even though you have the ability to create your own filesystems on CD- or DVD-R/RW drives and spare hard disks, you should still stick with an archiver program like tar to make your backups. The primary reason is simple: tar preserves all file attributes, including permissions and ownership. In addition, it is easier to manage full and incremental backups with tar.

If you choose to make backups with cdrecord (see Section 11.2.2, your best bet is probably to write a compressed tar archive directly to the CD or DVD with a command like this:

tar zcf - | cdrecord dev=dev cdrecord_args -

You may need to experiment with the speed option to cdrecord, because the archiving command may not produce data fast enough for your recorder.

Again, remember that this command does not create a filesystem on the disc. To read from the archive, you can just use the raw device.

13.5.1 Backups to Hard Disks

Using a spare hard disk for backups is relatively easy. Create a regular filesystem on the disk and simply write your archives as regular files. You should be able to keep a fair amount of data on the spare disk if you use compression and incremental backups.