By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
Did you know that there's a difference between backup devices that rewind and those that don't. Of course you did. But Linux has to know as well, as this tip tells us. If you have a backup tip, why not send it in? We'll enter you in our tips contest and you might win a nifty prize.
In Unix and Linux it is fairly easy to write shell scripts to back up the system to tape using the utilities built into the operating system. However anyone who does so needs to keep in mind the difference between rewinding and non-rewinding tape devices.
The difference is in the device drivers. A rewinding device issues a rewind command at the end of a session and a non-rewinding device doesn't. Rewinding devices are most commonly used when a tape is to be unmounted at the end of a session. Non-rewinding devices are useful for incremental backups and other applications where files are written at the end of the previous session's written files.
Unfortunately it is easy to confuse rewinding and non-rewinding devices with disastrous results for incremental backups. If you attempt an incremental backup on an already-mounted rewinding device, the tape will be wound back to the beginning and you will be writing over your previous backup. The situation isn't helped by the fact that the designators for rewinding and non- rewinding devices are very similar. For example the first rewinding SCSI tape device on a system is usually /tape/dev/st0 while the first non-rewinding SCSI tape device is usually /tape/dev/nst0.
One solution is to use symbolic links to establish an unambiguous alias for these devices and use them to prevent confusion.
Rewinding and non-rewinding devices and the creation of symbolic links should be discussed in detail in the documentation for your Unix or Linux system.
Rick Cook has been writing about mass storage since the days when the term meant an 80-KB floppy disk. The computers he learned on used ferrite cores and magnetic drums. For the last twenty years he has been a freelance writer specializing in storage and other computer issues.
Did you like this tip? Whether you did or not, why not let us know. Drop us an email and sound off.