I have server 1 and Server 2.
In step one there is one script running in server1 that generates one file, after the process of creating the file is finish I need to upload the file to Server 2.
What is the best method and approach?
Thanks, Pedro
I have server 1 and Server 2.
In step one there is one script running in server1 that generates one file, after the process of creating the file is finish I need to upload the file to Server 2.
What is the best method and approach?
Thanks, Pedro
There are multiple ways to transfer files in linux. The most common and simples way is scp:
[]- marks optional arguments. If you for example is login in to server 1 you could do:
or if you need a different username on server2, change server2 to username@server2
If you which to have some more advanced features, like syncing and only copying new files, take a look at rsync (checkout man rsync)
rsync is a good way of doing this