I'm starting to write an (sophisticated) FTP distribution script, but I thought: this can't be! I'm reinventing the wheel! Reliably distributing files to remote servers under controlled conditions from a central location is as old of a task as computers are, damn it!
Please someone prove me right.
Google search on this subject is so broken by Linux world over-using the word "distribution".
Also, I know everything about rsync and rdist. Here I am constrained to FTP, so please don't suggest those.
Just to show what I'm talking about, here is the header of my (empty) script :
# Example usage: FTPdist.ksh --simulate -l /tmp/Script.sh -r $BIBSH_DIR -d dune,camel -p dgft4sG55 -e expNoob -o itg:itg -c 555
#
# usage: FTPdist.ksh <-l local_file1[,lf2,..]> <-r remote_path> <-d remote_srv1[,remote_srv2,..]> [-t trace_file]\
# <-p FTP_passwd> [-u FTP_login] [-e ext] [-n] [-o owner[:group]] [-c mode] [-g] [-q] [-v [verbosity_level]]
# or: FTPdist.ksh <-f instructions_file> [-n] [-t trace_file] <-p FTP_passwd> [-u FTP_login] [-e ext]
# [-o owner[:group]] [-c mode] [-g] [-q] [-v [verbosity_level]]
#
# By default, FTP_login is "root".
# -n: do a simulation run to see if any FTP/login/rights problems exist.
#
# Distribute <local_file> to all <remote_srvs> using FTP. Target location on remote servers: <remote_path>.
# If a file already exists on remote server, rename it first with date extension + .[ext].
# By default, ownership is preserved. If -o option is provided, ownership will be given to argument.
# This script is meant to connect as root . If you're not using root FTP login, make sure you have
# enough privileges on remote servers/files (do a simulation first with -n).
# If -c option is used, a chmod is performed on the remote file.