Re: What is the best way to duplicate a tape?
On Wednesday 19 April 2006 09:01, Filip RembiaĆkowski wrote: > broken syntax. maybe you meant "do true; done;" ? why not just a short > cantrip dd if=/dev/nst0 of=/dev/nst1 bs=32k I did mean do : done. But you must use a loop because a single run of dd will only copy the first file on the tape. When reading a tape on UNIX, you get EOF at the end of each filemark. > Does it support simple mirroring? Yes. --Ian -- Zmanda: Open Source Data Protection and Archiving. http://www.zmanda.com
Re: What is the best way to duplicate a tape?
On Mon, 2006-04-17 at 16:01 -0400, Jon LaBadie wrote: > On Mon, Apr 17, 2006 at 01:35:04PM -0600, Tom Schutter wrote: > > I was wondering if anyone can tell be the best way to duplicate an > > Amanda tape on a Linux box. I will have two identical tape drives. I > > would much prefer to use standard UNIX commands. The program "tcopy" > > would be perfect, but it is not available on Debian, it a google search > > indicates that is has problems. > > I would think that "dd" could do the trick, but what is the correct > > incantation? > > > > tcopy was going to be my suggestion until you said you were > not using Solaris :( Is tcopy available on any other OS? > > If you know the tape block size (amanda's is 32K) then > I think it would be: > > dd bs=32k if=/dev/ of=/dev/ > > where xxx are the no compression devices or with compression > turned off. > > As I type this I realize that dd will only copy the first > tape file. So this will have to loop. And you will need > to use the no-rewind device. So something like: > > $ mt -f /dev/n rewind > $ mt -f /dev/n rewind > > $ while dd bs=32k if=/dev/n of=/dev/n > > do > > : # a colon == no-op command > > done > > dd returns 0 on successful copy, non-zero on failure. > The loop should terminate when the input fails at EOT. Perfect, just what I needed. For the archives, a slight improvement (so the command is easier to repeat): while dd bs=32k if=/dev/n of=/dev/n ; do : ; done -- Tom Schutter (mailto:[EMAIL PROTECTED]) Platte River Associates, Inc. (http://www.platte.com)
Re: What is the best way to duplicate a tape?
Tom, No guarantees, but you might try something like: mt -f /dev/nst0 rewind mt -f /dev/nst1 rewind while dd if=/dev/nst0 of=/dev/nst1 bs=32k; do done; In general, if you want Amanda to write two copies of your data, you should use the RAIT driver. Cheers, --Ian On Monday 17 April 2006 15:35, Tom Schutter wrote: > I was wondering if anyone can tell be the best way to duplicate an > Amanda tape on a Linux box. I will have two identical tape drives. I > would much prefer to use standard UNIX commands. The program "tcopy" > would be perfect, but it is not available on Debian, it a google search > indicates that is has problems. > I would think that "dd" could do the trick, but what is the correct > incantation? -- Forums for Amanda discussion: http://forums.zmanda.com/
What is the best way to duplicate a tape?
I was wondering if anyone can tell be the best way to duplicate an Amanda tape on a Linux box. I will have two identical tape drives. I would much prefer to use standard UNIX commands. The program "tcopy" would be perfect, but it is not available on Debian, it a google search indicates that is has problems. I would think that "dd" could do the trick, but what is the correct incantation? -- Tom Schutter (mailto:[EMAIL PROTECTED]) Platte River Associates, Inc. (http://www.platte.com)