Linux administrative tasks > Copy to another server via network.
Author: Aleksandr Chirkov
Dec. 2, 2013, 1:30 a.m.

There could be situations when you should copy files or block device to another system via network. There are a few methods to do it.

 

1. Copy files with ssh:

 

scp -r /home/user/testdir /etc/init.d/my_init_file user@192.168.56.2:

 

-r means recursively copy directories

First part of command is what exactly we copy (files and dirs), second is where we copy. Two points after ip address means that we want to copy to home dir of user.

 

2. Copy block device with netcat:

 

on server where copy:

nc -l -p 5555 | dd of=/dev/sdc 

 

Firstly, execute this command on remote machine that netcat open socket and listen. -l option is LISTEN mode, -p is port. dd command copy block device to /dev/sdc device.

on server from copy:

dd if=/dev/sda bs=1M | nc 192.168.56.2 5555

 

3. Copy block device with ssh:

 

dd bs=1M if=/dev/sda | sudo -S ssh root@192.168.56.2 'dd bs=1M of=/dev/sdc'

 

bs option means copy data by 1M.

 

-S option in sudo means that sudo will ask you passwd from root privileges on remote host.

 

4. Prevoius example with progress bar:

 

dd bs=1M if=/dev/sda | pv -s 10g | sudo -S ssh root@192.168.56.2 'dd bs=1M of=/dev/sdc

 

You could use -c flag with ssh for compression data or gzip via pipe. It is useful if you copy data via internet.

netcat
dd
ssh
buy accutane for acne Cephalexin Mod http://costofcial.com - viagra cialis Buy Acyclovir Without Prescription Ingredients In Amoxicillin Trichomoniasis Zithromax Giving Toddler Amoxicillin Effets Secondaires Cialis Prostate viagra cialis Comment Acheter Cialis Internet Cialis Tadalafil Precios Amoxicillin Dental Appointments Cheapest Price For Viagra http://costofcial.com - viagra cialis Kamagra Review Forum Amoxicillin Dizziness Zithromax 3 Day Dose
writing the college essay good argumentative essay write my essay.com [url=https://argumentative.us.com]argumentative[/url]
organic alternative to cialis [url=http://cialisle.com]cialis[/url] cialis indian brands http://cialisle.com kandungan obat cialis
how much does viagra cost in the uk [url=http://viagrabs.com/]buy generic viagra[/url] cialis and viagra reviews buy viagra online holland and barrett viagra alternative
Order Wellbutrin Without Prescription [url=http://cialiviag.com]cialis from canada[/url] Levitra Sample Online Pharmacy
Buy Sildenafil 100mg cialis natural femenina check this out we use it cialis buy usa c cialis r official site compare price generic cialis purchase cialis generic cialias rx buys cialis buy cialis through paypal cheap super cialis uk Sildenafil wow canada cialis generic cilais cialis sildenafil citrat 100mg cialis in denver just try cialis pills buy soft tabs generic cialis buy cialis average cialis proce price cialis mexico pharmacy cialis sales wa [url=http://asianteaarts.com/]Sildenafil Citrate 50 mg[/url] cialis online without find out more cialis effects in urdu brand cialis wholesale before and after cialis use cialis original patent cialis online sales generic cialis vs generic cialis cialis effe cialis e insufficienza renal http://asianteaarts.com
cialis 20 mg effects cialis forums uk cialis de cialis baratos cialis 2010 chile look there cialis now online cialis nur mit rezept calis 20mg cialis cialis yahoo click here cialis for women generic cialis best price saturn cialis levitra sale of cialis online cyalis [url=http://ph2oc.com/]cialis 20[/url] cialis shop in malaysia buy female pfizer cialis buy cialis for women drug cialis moins cher lyon cialis andorra precio cialis best price http://ph2oc.com/
buy generic levitra online how much does a cialis cost we like it cialis soft gel generic cialis 20mg uk bulk cialis cialis en 24 hora wow look it cialis mexico [url=http://theitchblog.com/#Levitra-40mg]best place to buy levitra online[/url] i recommend cialis generico chinese cialis 50 mg http://theitchblog.com/#Levitra-40mg
60mg super active cialis wow cialis no rx required how much should cialis cost pilule de cialis prix saturn cialis levitra canadian pharmacy cialis super active buy cialis vegas cialis on line cialis pack trial visit our site cialis on sale online sales pfizer cialis [url=http://kaivanrosendaal.com/#ciallis]find out more[/url] cialis strips erfahrungen http://lamarme.com
free viagra for women online viagra without a prescriptuonviagra without a doctorbuy viagra online without script purchase viagra without a prescriptioncanada rx viagra without prescriptionviagra without a prescription ontario canada [url=http://fitnesshongkong.com/#buy-women-viagra]name of viagra for women...[/url] purchasing viagra without prescriptionviagra without a prescriptionget viagra without a prescription http://fitnesshongkong.com/#viagra-for-women
viagra without perscription cheap viagra without prescriptions usaviagra online without prescription- free shippingviagra pills without prescription buying viagra online without prescriptionviagra online without persciptionfemale viagra without prespri [url=http://lamarlandscaping.com/#Without-Prescription]buying viagra without a perscription[/url] http://lamarlandscaping.com/
cialis generika buy viagra without prescription onlinebuy viagra without prescription pharmacy onlinebuy viagra without the prescription cialus viagra without perscriptionbuy viagra without rxviagra without see a doctor [url=http://lamarme.com/#cialis-20-mg-price]generic cialis tadalafil 20mg reviews[/url] http://blackhawkdowns.com
buy cialis 20mg tablets viagra without a prescription ukwalmart viagra prices without insuranceonline viagra without prescription phiser viagra without perscriptionviagra uk without prescriptionviagra without a prescription buy cialis super online no prescription viagra without insurancebuy viagra without scripviagra without a doctor [url=http://cottagegroveresources.com/#20mg-levitra]buy levitra 20mg usa[/url] female viagra without presprigeneric viagra without prescriptioncheap viagra without script http://ryangikas.com/#Buy-Cialis-Without-Prescription
buy cialis 20mg online buy viagra pills without prescriptionorder viagra online without scriptviagra without a doctors prescription buy viagra without a rx in the usreal viagra without a scriptviagra online without rx cheap cialis no prescription buy order viagra without rx onlinebuy viagra without prescriptionsonline viagra without a prescriptuon [url=http://versesproject.com/#buy-cialis]buy cialis online 20mg[/url] super viagra without prescriptionsbuy viagra without consultationviagra without rx http://versesproject.com/#20-mg
buy cialis 20mg cheap viagra without a scriptviagra in canada without prescriptionbuy viagra without a prescription viagra without perscriptionsviagra for sale without prescriptionviagra without rx buy cialis without prescription healthy man viagra without prescriptiononline viagra without prescriptionviagra 100mg without prescriptions [url=http://ryangikas.com/#no-Prescription]buy online cialis without prescription[/url] ordering viagra without prescriptionviagra without see a doctorviagra without seeing a doctor http://versesproject.com/#20-mg
cost of levitra 20 mg viagra without side effectsgeneric viagra without subscriptionbuying viagra without a script viagra online without a prescription order viagra without a prescriptionviagra without seeing a doctorgeneric prescription viagra without [url=http://lamarme.com/#cialis-20-mg]buy cialis 20mg online[/url] http://lamarlandscaping.com
viagra pills 100 mg walmart real viagra without a scriptwalmart viagra prices without insurancebuy real viagra online without prescription brand viagra without a prescription prescription viagra from canada without prescriptiongeneric viagra without prescriptionsbuy viagra without prescription pharmacy online [url=http://mayavanrosendaal.com/#online-cialis]cialis pills[/url] http://lamarlandscaping.com

Leave a comment:

Name
Python
Web development
Review Linux
Administration
Provisioning CVS
Windows AWS
Continuous Integration
NoSql Logging Web Servers FileSystems Scala
accurev ansible apach2 apache api application approaches architecture archivation argparse arguments artifactory automation awk aws backup bash batch-scripting beaver block build built-in caching call captcha cartridge case certificates cgi chain client cloud cloudformation cluster cmd coding collections command-line commands compression conditionals conversion convert cookbook copy counter cron crud css cut cygwin daemon datatype date dd debpackage decorator delattr deploy deque dict distributed-file-systems django DNS domain driver dropbox dump elasticcache elasticsearch encryption exit ext4 extra-tags failover file filename filters for form format freetds functions gerrit getattribute gid git globals glusterfs hardware hook iam indexing inheritance init install job-interview jquery ldap linux list locals logging logs logstash lookup magicmethods mail main-menu metadata metalogger mongodb moosefs mount mssql multiplatform multithreading mysql netcat nginx nosql open-ssh openldap openshift os packaging parse partition path pattern patterns permissions pid pil pip pipe playbook pool post post-commit processes production provisioning proxy putty python python-mysql recursively redirection redis register replication repr restore return review rotation scala script search selenium server setattr settings setup shipper signals singleton slots snapshot socket splunk ssh ssh-key ssl storage str string style subprocess sugar super switch syntactic syntaxhighlighter systeminfo tail tar templatetags time tls tune2fs tuple ubuntu unicode unique unix unixodbc usage usecases uuid uwsgi variable vars version vi virtualenv volume web web-server windows with_items __getattr__