Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
deMark4258y@TechnoTrumpet scp is like cp but secure (e.g. over ssh)
So for copying files in Unix systems:
- cp for local copies
- scp for copying from local to a remote server (e.g. server to server copies) or remote to local.
Then you have rsync.. that works on magic. It compares the source and destination that you specify and then figures out what needs to be copied/deleted to sync the two. Effectively you could use it for incremental updates (e.g. say you have 100gb of files that need syncing but only 2gb has actually changed since the last time you copied it).
Rsync can be used to copy local->local, local->remote, remote->local... -
linttrap528yExactly! It's great over dodgey connections cause it doesn't have the same timeout/stall issues; same Newton speed, but vastly different performance!
-
I have to help re write a script that tells us when our machines can't rsync. Right now a script runs and guess oh
PotatoComp can't rsync, should this be in excludes (to not be auto rsynced)?
Not giving us any useful info on the system, whether it's still on the network, pingable or even in use.
I only have to help cause I wrote a py script to get me that info so I could hunt machines down.
I'm on the bottom rung of the dept (like the legs compared to the guys writing these scripts are the brains) and I'm being told I should just fix their script heh.. Like I'm not even paid enough for my bills let alone enough to fix your script while doing my actual job... Frustrating...(friggin rsync) -
deMark4258y@TEvashkevich err... Rsync runs a process in both ends, so for remote connections you need to also specify the install path to rsync if it's not standardized.
Plus there's a whole ton of exit codes that rsync uses for different reasons, some critical, some not.
I'd lean towards just doing it all in shell scripts though... -
@deMark yup shell and automated is how it's going. But sometimes comps fall off the network and it can't run and another script checks the last date it ran and gives me the useless potato output
-
deMark4258y@TEvashkevich hmm I'm thinking this should just be done via error handling of rsync command? It has a ton of non-zero exit codes so it would make sense if there was one where it can't connect to the target host.
Your script should catch $? then decide what to do with it when it's non zero, like log it and alert someone. -
@deMark likely. Not my script though. I'm just dealing with the shit output it gives. Written by someone else and I don't get paid enough to fix that
Related Rants
-
abhijith050513When you SSH into a machine and then SSH back into yours, you know you are drunk.
-
nickj58today at programming class... professor: today we will be teaching you about vim and using the terminal and s...
-
linuxxx19*SSH's into VPS* *Starts doing some general maintainance (updating, checking the logs etc)* *runs the who comm...
!rant
rsync is the best thing since sliced bread
undefined
magic
wizardry
ssh
winning