On Tue, 11 Mar 2008, Kelvin Woods wrote:
On Tue, March 11, 2008 16:27, Michael Ross wrote:
Michaël Grünewald schrieb:
Hi,
I am looking for a program able to make a remote FTP site look like a copy
of a local dir. I feel as if I were dunce-cap-awards(R) nominated, but I
really did not find one!
In ports/ftp many programs say they do the reverse, and a few say they
``mirror'' without more explanation. I gave a tried to mirror, ftpmirror and
ftpsync (among others), all of them broke or failed to be useful.
I need this to publish a web site on a space allocated to me by my ISP, I am
writing a script that automates publication, and at the very end, I
noticed the key-piece was missing!
I usually do it with lftp, in a script like:
[EMAIL PROTECTED] ~]$ cat work/websites/foobar/lftp.upload
#!/usr/local/bin/lftp -f
debug 3;
set dns:fatal-timeout 30;
set ftp:ssl-allow true;
open -u username,password host;
put upload/updating.php -o /index.php || exit 1
mirror --verbose=1 --parallel=1 --delete --reverse \
--exclude ".htaccess" --exclude ".htpasswd" \
--exclude "index.php" --exclude "updating.php" \
upload / || exit 1
put upload/index.php -o /index.php || exit 1
Then I'll call ./lftp.upload and be done.
Michael
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
"[EMAIL PROTECTED]"
I'd support this suggestion as well. Using lftp (from the ports tree)
requires nothing more that an FTP server at the remote end (i.e. the
ISP). It can "mirror" in both directions, i.e. client -> server and
server -> client.
lftp is neat and new (to me). It reminds me of the advice given by Evi Nemeth
gave in the first Unix book I read some years ago, paraphrased as, "look at all
the man pages every so often".
If the ISP supports ssh, putting a key on the server allows easy update for a
few files:
scp [-r] [path-to-file/]newfile.html [EMAIL PROTECTED]:/path-to-html/
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"