|
Summary More info FAQ Downloads
- INTRODUCTION
- COPYING
- MANIFEST
- CREDITS
- INSTALLING
- Auto installation
- Manual installation (recommended)
- UPGRADING
- RUNNING
- MISC
- Using ~/.netrc auto login
- Illegal words
- dot files e.g. .htaccess
- Known bugs
- Reporting bugs
- IF YOU DON'T LIKE IT
- CHANGES
- ACKNOWLEDGEMENTS
INTRODUCTION
Pushsite was originally developed to automate the process of keeping the files on my hosted website in sync with those on my machine over a dial-up connection. When I published Version 1, I was so overwhelmed for changes that I deceided a complete re-write was in order. See below for more details of the changes.
I'll try to keep the Freshmeat listing up to date. If you are unable to find www.freshmeat.net, or can't find pushsite on freshmeat.net, then contact me at the address supplied and I'll let you know where the current version is.
COPYING
Pushsite is GPL - see COPYING for more info. It MUST be distributed with the files described listed in MANIFEST unmodified. Additional material should be added in a file called README.OEM and/or in a sub- directory called OEM.
If you find it useful, it would be nice to get an Email saying so (colinmckinnon@technologist.com).
MANIFEST
README (this document) README.win32 (Docs for MS Windows 95/98/NT/...) COPYING (GPL) pushsite (the program) pushsite.conf (sample config file for Unix/Linux/Posix) pushsite.conf.win32 (sample config file for MS Windows 95/98/NT/...) pushsite.1 (man page) install.sh (bash script to install program) pushsite.faq (faqs, of course!)
CREDITS
Version 2.6 C.McKinnon Version 2.5 C.McKinnon, Demon Internet fix from Ian Macdonald, Passive fix from Robert Pearce Version 2.4 C.McKinnon, Touch fix from Bruno Bzeznik Version 2.3 C.McKinnon, Directories fix from Eddy Vervest Version 2.0-2.2 written by C.McKinnon Version 1.0 C.McKinnon, Andrew M. Bishop INSTALLING
Please note that any section marked [U] applies to Unix/Linux/Posix only. The instructions for Microsoft Windows are in a seperate file (README.win32)
Auto installation [U]
run install.sh and answer the questions - you need to know the name or address of the host to which you want to push files, and your username / password on thamachine, and, of course, the directory you want to push.
Note that you can run this script again in future to create new config files.
Manual Installation (recommended) [U]
Copy the executable to the location of your choice. I suggest /usr/local/bin unless you have reason to put it elsewhere. Copy the man page (pushsite.1) to the relevant man directory - /usr/local/man/man1. Read the man page, then edit the file pushsite.conf to reflect your settings. Test the config file by typing:
Finally, if there are no errors, copy this config file to /etc/pushsite.conf, or to ~/.pushsite.conf as appropriate.pushsite -e -f yourconfigfile -vv
UPGRADING
Upgrading to 2.5
This should be backwardly compatible with earlier 2.X releases. The only significantdifference is the addition of the passive option (which should be disabled by default. To enable passive FTP, add the following line in your pushsite.conf file:
Note that if 'passive' is enabled by default on your server then this will actually turn it off.$passive="y";
Upgrading to 2.3a
This should be backward compatible with the other 2.x releases. The timestamped directory listing of the remote host is now called ls.$www - where $www is the hostname you set up in the conf file. The program will try to automatically update the file if required.
Upgrading to 2.0
Although this is a complete re-write of the program, it should be backwardly compatible with version 1.0. If you have a previous version of pushsite installed, then all your existing command line switches should work OK with this version. If you hard-coded any settings in the old version, then you'll need to enter these into the config file.
The control files have been renamed in version 2.0. If you don't wish to re-send your entire website then:
- ensure your remote site is up to date (NB the worst that can happen is that the file will be sent again and an error generated)
- cd to the root of your source tree
- rename the file ls-lR as ls.remote
RUNNING
(assuming you have set up your config file)
running:will give an indication of which files require updating - for more details use -v or -vv. If no files require upating, then the output will be blank.pushsite -t
running:will run an integrity check on the remote site, and update any filespushsite
When you run pushsite for the first time, you will likely get a lot of warnings about files on the remote system being newer than the last update - this is because, in the absence of any better information, the program will assume that the first update was in 1986.
Subsequent runs should behave better.
The program creates a file ls.local in the top of the directory tree you intend to push. It also creates one or more ls.$www (where $www is the name of the remote system). Do NOT delete these files - PushSite uses them for tracking when files were sent.
Please note that if your pushsite.conf file is within the directory tree sent to the remote system, then it will be pushed along with the other files! Any file beginning "ls." will NOT be sent unless it has an extension set up in $chkfiles in the config.
See the man page for more info.
MISC
Using ~/.netrc auto login
Keeping all your passwords in one (_secure_)place is probably a good idea. If you can automatically login to the remote site, then you may want to setup pushsite to use this facility. search for 'netrc' in the pushsite program (after backing it up!). Change the ftp command line in each of the 2 open() statements to the approriate syntax you would use when starting the program from a shell. Normally just deleting the -n switch from the line should fix this.
If there is sufficient demand I may make pushsite a bit smarter about auto-logins in a future version.
Illegal words
If you tell it to, PushSite will check files for particular strings. You need to tell PushSite
The former is achieved by specifying a regular expression in the config file $chkfiles. Here are some examples:
- which files to check
- what to check for
See
- Don't check any files.
I'm a bit vague on RE's so I usually just tell it to check some absurd value:
$chkfiles="GHHxdfg99934";- Check anything with a filename containing ".htm", "cgi", ".pl", and ".php"
Note that it will check for the occurrence of these strings anywhere in the path - so all your .gif files in your ".../stuff.plop/" directory would be checked (if you had one).$chkfiles="(\\\.htm|cgi|\\\.pl|\\\.php)";
- Only match files ending in .html
$chkfiles="\\\.html$";
man perlre
for more info on Perl regular expressionsThe "illegal word" is also a regular expression.
Please note that pushsite will send a file even if it contains illegal words. The reason for this is, that in many cases, not sending the file may be worse than sending a file with an incorrect link in it.
Dot files
e.g..htaccess
By default PushSite ignores filenames beginning with a dot character. This can pose problems in some circumstances. While the next version will have a configuration option for this, in the meantime you will need to edit the program to change the four occurrences of
ls -lR
tols -laR
. These can be found in lines 53, 73, 530 and 531:
53 system('ls -laR >ls.local'); 73 system('ls -laR >ls.local'); 530-531 print "ftp> ls -laR ls.$www\n" if ($verbose==2); print FTP "ls -laR ls.$www\n";Known bugs
- Not strictly a bug, but pushsite is not aware if the ftp session it starts is not connected to the remote host. This should be evident from the STDOUT/STDERR. The exact message depends on your version of ftp e.g. when not connected to the internet I get the following on STDOUT:
ftp: connect: Network is unreachable ftp: connect: Network is unreachable
- If I specified -vv on the command line then I would expect to see responses from the ftp server in the STDOUT (note that this output is buffered seperately from the output of pushsite which can cause some confusion as to the real order of events):
220 ftp.server.co.uk FTP server (Version wu-2.4.2-academ [BETA-18](1) Mon Aug 3 19:17:20 EDT 1998) ready. Remote system type is UNIX. Using binary mode to transfer files.
Reporting bugs
Please give an outline of the problem. If it runs at all, pushsite should generate 2 files at the top of the source directory tree:
- please send copies of these along with your pushsite.conf (edited to remove your password).ls.local ls.YOUR_REMOTE_HOST
IF YOU DON'T LIKE IT
There are other programs which try to do the same task. a feature comparison is shown below:
- Weex: http://www.enjoy.ne.jp/~gm/program/weex/
- private areas
- support for multiple hosts in single session
- mailing list for help
- bidirectional support- ftp-www: http://www.gedanken.demon.co.uk/
- basis of pushsite 1.0,
- particular emphasis on demon.co.uk isp - collects demon specific files from remote site
- private areas - not uploaded- rsync: http://samba.anu.edu.au/rsync
- only sends the PARTS of files which have changed (i.e. suitable for very large files)
- requires remotes shell facility- sitecopy: http://www.lyra.org/sitecopy/
- Unix, Windows, OS2 versions
- WebDAV support
- written in C
- Uses MD5 checksum to detect changes
- Gnome front endCHANGES
20/1/2 Version 2.6 This version fixes the following issuesDate conversion bug - the billenium bug fix was flawed in its calculation of dates for files less than 6 months old from last year. As with the billenium bug the worst thing to happen was that bandwidth was wasted.1/7/1 Version 2.5 This version fixes the following bugs
Single connection to FTP server. Formerly PushSite would connect once to collect the file list from the remote system, disconnect, then connect again if any updates were required. However some FTP server configurations would not allow two logons to the same account in such a short interval. PushSite now only connects once.Billenium Bug! In several places a text comparison was performed in place of a numerical comparison. This caused mutiple files to be updated, thus squandering bandwidth!.Version 2.4 was not released
Previously any file in the source root directory beginning "ls." would have been sent to the remote system except for 'ls.local' and 'ls.$www' i.e. if you sent the same directory to multiple hosts then any mirror would get a directory listing from all the other mirrors.
Demon Internet changed their ftp server recently - the new one reports the root directory as ".:" whereas previously and on other systems there was no specific reference to the root.
The code has been updated to make it more portable - various flavours of the 'touch' program are now supported. It no longer requires the POSIX perl module. NB the changes mde may affect the internationalization of the program.
An option for passive FTP was added.
18/6/00 Version 2.3 This version fixes the following bugsProgram does not create directory trees in correct order to accept files (previous workaround was to run multiple times)19/4/00 Version 2.2 This version fixes the following bugs:
install.sh and sample conf file amended to refer to $pass instead of $password
Size of directories not validated any more - dir files have different sizes on different filesystems
Program no longer confused by latyest version of gnu ls which lists current directory as . when ls -lR
Program holds seperate timestamps and directory listings for different remote hosts.Installation script not compatible with bash v2.0+ Program does not work if log recipient's Email address contains a '@'5/4/00 Version 2.1 This version fixes the following bugs:
Password stored in config file not recognizedPassword not always communicated to remote system21/1/00 Version 2.0 This version fixes the following bugs:Empty remote directory crash
Illegal word check failure
Multiple passes required to delete directories
Should now work with demon.co.uk
The following functionality has been added:
Various options for config files
Intrusion detectionACKNOWLEDGEMENTS
Robert Thorsby
Kurt V. Hindenburg
Steve Quezadas
Jim Hague
Who all provided useful feedback and bug reports Mary & Anna Tea, sympathy and patience
|