Re: some changes in anonftpsync
On Sun, Mar 02, 2008 at 03:58:03PM -0300, Carlos Carvalho wrote:
> Among all these changes you could also put a SITE variable to define
> the mirror name, which in turn is used to create the trace file. Using
> the hostname often doesn't work, and never works for the official
Official mirrors are a small minority, you have to admit :)
hostname(1) invocation may not get us the canonical site name, but at least
it gets us something useful, which would not happen if we leave an empty or
boilerplate SITE variable. People who want to change it can easily adjust
the HOSTNAME variable.
> The slashes, or not, at the end of RSYNC_DIR are very prone to error
> and also very costly if a mistake is made. Our script removes any
> number of trailing ones and has them in the rsync command. This way no
> matter what is put in the data file (all variables are in a separate
> file that's sourced) the scripts works.
Yup, that's the fix that I commited earlier.
> For example, the new method of detecting stale locks doesn't work here
> because the filesystem is mounted with noatime. lockfile works because it
> uses mtime.
Good point... but that's just because we have -amin there. That can easily
be changed to -mmin or even simply -cmin. The script never actually
*accesses* the log file, it either creates it or it removes it, there's
no point in checking atime.
> With all our changes the official script ended up being just a
> starting point. Very likely this is the case with many mirror sites as
> well. Thus I think anonftpsync should emphasize the essential point:
> the 2-pass rsync with the necessary options. It already has the code
> but lacks the comments explaining the idea. So, my suggestion is not a
> change of code, just the inclusion of the theory behind it.
Or maybe we just add that part of the theory to
http://www.debian.org/mirror/ftpmirror#how , which should have been done
in the first place :)
2. That which causes joy or happiness.