Disclaimer: Its a collection from lots of other site(s) and few of my notes. I would also like to declare that I am not owning lots of its content. Please feel free to contact me directly if you want me to remove any of your content, that you don't want to share to other through this blog.
Friday, 14 February 2014
parallel-scp
parallel-scp:
NOTE: you might consider doing: dos2unix <filename> to convert the file from windows/mac developer to unix format, before hosting the file into the unix servers.
[ you need install pssh for parallel-scp ]
$ parallel-scp -h <FileWithServersList> -x "-i key -P port" -l ubuntu path_to_source_file <remote_path/[file_name]>
example:
$ parallel-scp -r -h List_of_server.txt -x "-i server_private_key -P ssh_port" -l username /home/amitmund/source_file /absolute/path/for/remote/file
example script:
#!/bin/bash
echo" This command will take the following inputs and run the parallel scp command"
read -p "Please enter the host file where you have all the host: " HostsFile
read -p "Please enter the key details: " AwsKey
read -p "Please enter the source_file_path: " source_file
read -p "please enter the remote_path_where_to_scp: " remote_path
/usr/bin/parallel-scp -r -h $HostsFile -x "-i $AwsKey -P PORT" -l ubuntu ${source_file} ${remote_path}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment