Re: looking for thread about backup using ssh -T

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

 



Cameron Simpson wrote:
On 12Apr2008 13:15, Mike Wright <mike.wright@xxxxxxxxxxxxxx> wrote:
Hi all,

There was a fascinating thread about using ssh to do backups to a remote host without using a term. Something like:

    "tar jc some_dir | ssh -T user@remote cat > backup"

Tried the examples and then some --- works great!

I seem to have fat-fingered the delete key and have lost that email thread and try for the life of me can't find it again.

Get rid of the -T. The "cat >backup" needs to be executed by the shell
at the far end, so quote it:

  tar cf - some_dir | ssh user@remote 'cat >backup'

I don't think you totally understand -T, should be used whenever the stdin is not 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."

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

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. ;-)


--
Bill Davidsen <davidsen@xxxxxxx>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux