• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

Script for copy&delete directory from one server to another


New Member
Hey everyone,

I have 2 remote Servers: Server A and Server B.
On Server A I have a directory named: 'Example'
I need to copy 'Example' directory from Server A to Server B and then delete it from Server A (if there's a possibility to do it by one command it would be better of course).
I would like to create a script for those actions, I saw there are some options with scp/rsync commands.
I think that I need to configure ssh-key too so they'll do it automatically without the need of authentications all the time - would like to have more information about how I need to do that.

Thank you guys!

Members online

Latest posts