Ftpsync
From Koset Surakomol
Script
Article, script or local mirror
Ftpsync man page
pre NAME
ftpsync - Sync a hierarchy of local files with a remote FTP repository
SYNOPSIS
ftpsync [-h] [-v] [-d] [-k] [-P] [-s server] [-u username] [-p password] [-r remote] [-l local] [-i ignore] [-o offset]
ARGUMENTS
The recognized flags are described below:
-h
Produce this documentation.
-v
Produce verbose messages while running.
-d
Put the Net::FTP object in debug mode and also emit some debugging
information about what's being done.
-k
Just kidding. Only announce what would be done but make no change in
neither local nor remote files.
-P
Set passive mode.
-i ignore
Specifies a regexp. Files matching this regexp will be left alone.
-s server
Specify the FTP server to use. Defaults to localhost.
-u username
Specify the username. Defaults to 'anonymous'.
-p password
Password used for connection. Defaults to an anonymous pseudo-email
address.
-r remote
Specifies the remote directory to match against the local directory.
-l local
Specifies the local directory to match against the remote directory.
-o offset
Allows the specification of a time offset between the FTP server and
the local host. This makes it easier to correct time skew or
differences in time zones.
DESCRIPTION
This is an example script that should be usable as is for simple website maintenance. It synchronizes a hierarchy of local files / directories with a subtree of an FTP server.
The synchronyzation is quite simplistic. It was written to explain how to use Net::FTP and File::Find.
Always use the -k option before using it in production, to avoid data loss.
BUGS
The synchronization is not quite complete. This script does not deal with symbolic links. Many cases are not handled to keep the code short and understandable.
AUTHORS
Luis E. Mu�oz luismunoz@cpan.org
SEE ALSO
Perl(1).
/pre File:Example.jpg
