Results 1 to 3 of 3

Thread: Copy Set Of Files to Multiple Servers Simultaneously

  1. #1
    Member
    Join Date
    Apr 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Lightbulb Copy Set Of Files to Multiple Servers Simultaneously

    Hey Now I have tried to copy set of files to more than one server at once to reduce time consuming.
    i googled but only i can found is a loop. i don't understand to move further.

    please educate me on this using a example.

    help is much appreciated.
    Thanks
    Inshaf

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,374
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    You can't. The for loop will just automate the process. To copy file to server1 you will type
    Code:
    rsync -av /path/to/dir user@server1:/path/to/dest
    To copy same to server2, you will type
    Code:
    rsync -av /path/to/dir user@server2:/path/to/dest
    You will use for loop to replace server1, server2, server3:
    Code:
    for s in server1 server2 server3 
    do
      rsync -av /path/to/dir user@${i}:/path/to/dest
    done
    I suggest that you start learning the shell scripting.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Member
    Join Date
    Apr 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Thanks for the information.

    OK can please let me know how can i transfer file between two remote servers ?

    Thanks
    Inshaf

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 1st February 2011, 09:10 PM
  2. useradd on multiple servers
    By pinoyskull in forum Shell scripting
    Replies: 5
    Last Post: 17th September 2010, 04:03 PM
  3. Can i have multiple servers live on LAN ?
    By satenderruhil in forum High Availability Cluster
    Replies: 6
    Last Post: 10th August 2010, 06:23 PM
  4. Multiple servers acting like one?
    By permalac in forum High Availability Cluster
    Replies: 2
    Last Post: 27th January 2010, 01:28 PM
  5. script to rm files on multiple servers
    By steve_f60 in forum Shell scripting
    Replies: 1
    Last Post: 21st June 2008, 10:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41