Re: looking for thread about backup using ssh -T

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13Apr2008 21:59, Bill Davidsen <davidsen@xxxxxxx> wrote:
> Cameron Simpson wrote:
>> Get rid of the -T. [...]
>
> I don't think you totally understand -T, should be used whenever the stdin 
> is not a tty.

Um, no. If stdin is not a tty, you don't need -T. -T prevents pseudotty
allocation, and that only happens if stdin is a tty.

> Failure to do so can cause some issues with binary files 
> being transferred, from memory the binary can contain the escape character.
> From the man page:
> "If no pseudo-tty has been allocated, the session is transparent and can be 
> used to reliably transfer binary data."

Sure. But in this circumstance a pseudotty won't be allocated anyway.

> Mike - please ignore the advice to drop -T, it is not correct!!

I think my advice about -T is irrelevant. But not _wrong_.
It was more that -T is misleading because it's irrelevant.

People have an amazing tendency to remember specific incantations and to
read too much into the components (because they don't go back to the
manual and figure out exactly what each part of the incantation does,
they just guess from context). So I like to supply the simplest possible
incantation because it has less opportunity to seem magic or be treated
that way.

To the OT: I was asking you to drop the -T because is is irrelevant to
your problem. To Bill: I really think the -T is unnecessary in this
case. I would be very happy to have my thinking corrected with a
reproducable counter example though.

>> Without the quotes your local shell takes the ">backup" and funnels the
>> data to the _local_ file "backup". So you pump the backup over the net
>> via ssh, and _back_ again, landing locally.
>
> That advice is exactly correct. You can also use dd instead of cat, some 
> people claim that the buffering helps. I don't see it myself. ;-)

I'd stay with cat, again because dd is misleading - it leads people to
specify a buffer size and that leads to unnecessary burstiness when it's
not "ideal", which is probably almost always.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

All the doors in this ship have nice sunny dispositions. It is their
pleasure to open for you, and their satisfaction to close with the knowledge
of a job well done.     - Marvin _The Hitchhiker's Guide to the Galaxy_


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux