beginner question about faq 10.2

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

beginner question about faq 10.2

Jose Fragoso
Hi,

FAQ 10.2 explains how to duplicate a filesystem. I would like to put that one-liner in a shell script to be run periodically through crontab. I mean, I would like:

cd /SRC; dump 0f - . | (cd /DST; restore -rf - )

in a shell script.

Whenever this script is run, I see an error message like:

restore: cannot open /dev/tty: Device not configured

My question is:

Is there any way to do this dump/restore in a shell script without the use of a temporary filesystem?

Thanks in advance

Best regards,

Josi



--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/

Reply | Threaded
Open this post in threaded view
|

Re: beginner question about faq 10.2

Alexandre Ratchov
On Fri, Jan 20, 2006 at 10:40:03AM -0500, Jose Fragoso wrote:

> Hi,
>
> FAQ 10.2 explains how to duplicate a filesystem. I would like to put
> that one-liner in a shell script to be run periodically through
> crontab. I mean, I would like:
>
> cd /SRC; dump 0f - . | (cd /DST; restore -rf - )
>
> in a shell script.
>
> Whenever this script is run, I see an error message like:
>
> restore: cannot open /dev/tty: Device not configured
>

imho, you can just ignore this message. However, sometimes dump tries
to interactively ask (on the terminal) to change the tape; but cron(8)
doesn't have a terminal. I'd suggest you to use the '-a' option of
dump(8) to avoid this problem.

> My question is:
>
> Is there any way to do this dump/restore in a shell script without
> the use of a temporary filesystem?
>

i don't think so.

--
Alexandre

Reply | Threaded
Open this post in threaded view
|

Re: beginner question about faq 10.2

Morris, Roy
In reply to this post by Jose Fragoso
> Hi,
>
> FAQ 10.2 explains how to duplicate a filesystem. I would like
> to put that one-liner in a shell script to be run
> periodically through crontab. I mean, I would like:
>
> cd /SRC; dump 0f - . | (cd /DST; restore -rf - )
>
> in a shell script.
>
> Whenever this script is run, I see an error message like:
>
> restore: cannot open /dev/tty: Device not configured
>
> My question is:
>
> Is there any way to do this dump/restore in a shell script
> without the use of a temporary filesystem?
>
> Thanks in advance
>
> Best regards,
>
> Josi
Hmm quick look it looks like you should use dump -0af -

but do some testing yourself ..

Rm