Advanced file transfer

Hey all.

I need to transfer files from one system to about 5 other systems, and i have to do it manually, and we do get a lot of requests for the same. Presently this is done using a shell script, but it has to be run on each of the 5 systems. Also, a backup of the file needs to be preserved before deploying the new one. FTP does not allow renaming copying the file on the remote system. i am at my wits end tryin to figure out a solution :wall:Any help would be appreciated.

Is ssh/scp/sftp an option for you?

I dont think so. It still doesnt solve the problem of backing up the existing file before deploying the new one. Will any of these commands work from a single machine? heres what i need: Transfer files from one single machine to 4 other machines. Preserving backup of the file being transferred is very critical. FTP does not work for me as it does not allow renaming of files. I feel SSH is dangerous for me to use.

ssh is not dangerous at all. ssh which bring scp and sftp as well is encrypted while ftp is not encrypted at all.
When you already have a shell script, create a list of which files you want to transfer, simply make a backup with the cp command for example and then scp/sftp them away.
Using scp/sftp in scripts, you usually create password/passphrase less key pairs, a public and a personal key. You give or exchange the pub key with the other side. When they add it to their .ssh/authorized_keys they will allow you to connect with that user without having to enter a password. So there will also no password be in your scripts.
To serve several target hosts, you will just have to work a list of hosts in your script, inside a for loop for example.

Does this take care of backing up the existing files on all the target machines?
if i have 5 machines, i need to preserve the backup on all the 5 machines.

If you script it, yes. You could issue that remote backup with ssh.

Relative to the server which initiates the ftp, there is no ftp "rename" command for local files but there is ftp "rename" for remote files (subject to directory permissions). Note that the command is actually "rename" not "mv".
It is conventional to ftp files under a temporary name then rename them after a successful transfer.
Assuming you will be initating the the ftp from the master computer you could rename the target file just before renaming the file you transferred successfully under a temporary name.

You can ftp to "localhost" if it is important to use ftp to rename local files but most scripters would just use shell commands.