scp with compression.

scp -C 10.0.0.4:/tmp/backup.sql /path/to/backup.sql
-C is for compression.

10
By: OJM
2010-02-15 12:39:46
scp

2 Alternatives + Submit Alt

  • I've kept the gzip compression at a low level, but depending on the cpu power available on the source machine you may want to increase it. However, SQL compresses really well, and I found even with -1 I was able to transfer 40 MiB/s over a 100 mbps wire, which was good enough for me.


    3
    ssh 10.0.0.4 "cat /tmp/backup.sql | gzip -c1" | gunzip -c > backup.sql
    kennethjor · 2010-02-14 19:09:07 0
  • If you have servers on Wide Area Network (WAN), you may experience very long transfer rates due to limited bandwidth and latency. To speed up you transfers you need to compress the data so you will have less to transfer. So the solution is to use a compression tools like gzip or bzip or compress before and after the data transfer. Using ssh "-C" option is not compatible with every ssh version (ssh2 for instance).


    0
    ssh 10.0.0.4 "gzip -c /tmp/backup.sql" |gunzip > backup.sql
    ultips · 2012-01-06 17:44:06 3

What Others Think

You forgot to mention your OS. No such option in my ubuntu scp
zolden · 652 weeks and 1 day ago
The compress option is pretty standard. I have it available on Ubuntu 12.04, Linux Mint 13, FreeBSD 9.2 and 9.3
DaveQB · 406 weeks and 6 days ago
As I have beginning late gotten the information about the Canyon View Accommodation. I often visit http://www.prepositionchecker.com/10-examples-of-preposition-correction/ to read a useful info. I will pick it. I need to win this opposition.?
Ahmed74 · 69 weeks and 5 days ago
As I have beginning late gotten the information about the Canyon View Accommodation. Visit http://www.prepositionchecker.com/10-examples-of-preposition-correction/ for more ideas. I will pick it. I need to win this opposition.?
Ahmed74 · 69 weeks and 5 days ago
A colossal piece of the affecting individuals have made a cutoff among religion and themselves. One hire this homepage for more info. This thing is beating the division in our overall people.
Ahmed74 · 69 weeks and 5 days ago
An understudy online course program may be boggling to you considering the room and comfort it gives. Check this homepage for getting wonderful info. By a wide edge by far an enormous segment of individuals get squashed. In any case, it should be seen that web sorting out model isn't basic.
Ahmed74 · 69 weeks and 5 days ago
After quite a while, we are seeing the amazing update of Eternal DB. You can visit PassiveVoiceFixer.com for more details. This game will wind up being incredibly stupefying and stunning for us we when in doubt.
tinakutch · 64 weeks and 5 days ago
This looking at direct is covering the perspective of all conceivable Hotmail email login messes up which an individual can understanding. Try this www.plagerismchecker.net it will help you a lot. Accordingly, having this guide is proposed.
tinakutch · 64 weeks and 5 days ago
Share some fresh facts about the online game drift boss, which is a fantastic never-ending swinging game.
jillianmontague · 31 weeks and 5 days ago
Thank you for posting this article. I act as a test user of game websites to test the safety of those game sites, I found a game that is being played a lot by students and is quite safe for everyone. The slope game is a fun game with a running ball. It's a popular game that appeals to people of all sexes and ages.
felicia112 · 30 weeks and 1 day ago
Prepare for flight for an enormous steep way without an end. Incline slope unblocked game is a 3D space game, you need to drive the ball running on a superficial level and defeat slant, rough surfaces, and your child causes you to let completely go and effectively tumble off the surface.
huriel · 28 weeks and 6 days ago
Friday Night Funkin is a cool rap fight game in which you really want to feel the beat of the music. friday night funkin unblocked Solid contenders, rap duels, and fun!
okpermanent · 27 weeks and 4 days ago
Thank you very much for writing such an interesting article on this topic. This has really made me think and I hope to read more. slope io
irene167 · 22 weeks and 6 days ago
Wonderful post. This post is one of the best posts according to my point of view. Your work is so good and impressive. hotmail login
suri2905 · 22 weeks and 4 days ago
Thank you for your article, I am very lucky to have read this article fleeing the complex
Swenyly · 13 weeks and 1 day ago
HVAC stands for heating, ventilation and air conditioning. A lot of people wonder what it is and how it works.
payamd · 10 weeks and 2 days ago
The first i want to say thank to you, Do you know stickman boost ? i think you should try it, It will also be of great help.
Jennytrippi02 · 9 weeks and 5 days ago
The problems you raised and how to solve them are very good and detailed and death run 3d. Must have a great compliment for you. I will always come here when I have related questions
jordanlaris · 9 weeks and 5 days ago
I want to thank you first of all. Do you know about Stickman Boost? I advise you to give it a shot because google feud it will also be quite beneficial.
ednelson10 · 7 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: