3 ms·
The only good file transfer solution has always been to use rsync over ssh instead of scp or sftp. I have stopped using scp and sftp many years ago. Besides th
by adrian_b 8y ago
The only good file transfer solution has always been to use rsync over ssh instead of scp or sftp.
I have stopped using scp and sftp many years ago. Besides the fact that sftp can be too slow, both scp and sftp fail to make identical copies of the transferred files because sometimes they can lose some metadata, e.g. extended attributes or high resolution time stamps.
- adrian_b 8y agoWhat I am normally using is: alias scp='rsync --archive --xattrs --acls --progress --rsh="ssh"'
- chrisweekly 8y agoThis gets my vote for nicest alias in the thread.
- deleted 8y ago[deleted]
- danudey 8y agoI've become a huge fan lately of using "--info=progress --no-inc-recursive" for rsync. It can result in more memory usage, since it builds the file list ahead of time rather than dynamically, but it provides you with an overall progress report of the entire transfer, rather than per-file progress reports which may be much less useful.
- seqizz 8y agoAaaah I was so happy to switch until I see "The source and destination cannot both be remote."
- tyingq 8y agoUsing ssh with tar on both ends is my go to for a new box that doesn't have rsync. Long command lines, but it retains metadata. Like: ssh remote 'cd /src;tar -cf - .' | (cd /dst;tar -xf -) Doesn't call you out so well on typos though.
- justinclift 8y agolftp can be handy too, as that can automatically parallelize transfers. eg, instead of one connection (eg rsync), lftp can transfer each file using n parallel streams. Very useful with large files, when there's some kind of bandwidth limit per TCP connection.
- pletnes 8y agoToo bad there’s no rsync for windows
- ptman 8y agoWSL
- LinuxBender 8y agoCygwin provides rsync, sftp and lftp for windows.
- user9182031 8y agoCygwin just feels "heavy" when all I want is rsync. Without any package management (that I'm aware of) I can't just install rsync and whatever other dependencies it has, I have to put hunderds? more binaries on my system.
- LinuxBender 8y agoThere is also a linux subsystem for windows 10 which I have never used. Perhaps someone can say if that has rsync. [ edit ] if that and cygwin are too heavy, you could request the samba team create a posix windows build of rsync. They had one long ago, but stopped supporting it. That would be a single binary. I suspect they will push back.
- pletnes 8y agoIt does.
- user9182031 8y agoThis is even heavier. It's a full blown Ubuntu install.
- user9182031 8y agoAfter a bit of Googling, it looks a company has complied and packged rsync for Windows at a cost of $19 per license @ https://www.itefix.net/cwrsync https://www.itefix.net/cwrsync I found a Github repo with an older (2017) version of cwRsync that may be from before it went behind a paywall @ https://github.com/billyc/cwrsync-installer https://github.com/billyc/cwrsync-installer
- pnutjam 8y agoYeah, sftp can't see extended attributes. It's flags are also more cumbersome then scp. For example: sftp -o IdentityFile=keyfile or scp -i keyfile