Linux (Bash) – Copying very big things from one server to another across a flaky connection

Sometimes a tester needs to go to great lengths to reproduce a failure or compare behaviour … or just to have the slightest chance of understanding what the hell is going on .
Earlier today I had to copy a very big file (that contained the only known data set capable of reproducing the failure I’m investigating) from one server to another. I work behind a proxy server, and there’s also a second, independent proxy server and a firewall inbetween the two servers in question – as a result my initial attempts with SCP and RSYNC all ended in failure (due to connections being lost/sessions being dropped mid-transfer).

This is the command that got the job done:

nohup scp originalFile.zip user@host:path/destinationFile.zip &

More on the use of nohup and &:
http://www.cyberciti.biz/tips/nohup-execute-commands-after-you-exit-from-a-shell-prompt.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s