** Preface: I don’t know much about networking. If i described the set up wrong, I’ll try again. **
I have a server cluster of serverA, serverB, and serverC all behind a firewall and on a switch. I want to move a file from serverA to serverB programmatically. In the past when I had to move a file on serverA to another location on serverA I just call exec(“sudo mv file1 /home/user/file1”); Can I still do this when multiple servers are involved?
EDIT: All great responses guys. I look into how the server’s is cluster and find out if it’s a mount or what’s going on. Thank you EVERYONE! You guys are my hero!
If you use a common share like nfs that is mounted to all the servers, you can use mv on a file.
If you don’t have that option, you can transfer the file to another server using scp or rsync.