
mmm.cfg - Main configuration file for mmm

This control mmm behavior and mirrors task to achieve.
The format is ini-files like. The files contains sections, each section is identified by a keyword between "[]".
Each section is a mirror task to do.
The default section contains global settings,
which applied to all mirroring tasks.
[default]
pidfile = /var/run/mmm.pid
[task1]
path = /any/path/
url = rsync://server/share/
The field accept any string. The meaning depend of paramter type.
This field are boolean. Several keywords are accepted:
yes / no
true / false
on / off
1 / 0
Accepted number, can by suffixed by a unity. Without any unity, the delay is in minute. Valid unity are
- m: minutes
- h: hours
- d: day
- w: week (7 days)

All these parameters goes into the default section.
("string")
The directory where mmm will store data and cache about its jobs.
statedir = @LOCALSTATEDIR@/mmm
("string")
Use by mmmd only. The path of a file to keep a pointer of the current mmmd PID.
pidfile = /var/run/mmm.pid
("string")
The directory where xml mirrors list are located. These list are used when mirroring task use "source" to find nearest mirrors.
mirrordir = @SYSCONFDIR@/mmm

All this parameters can be setup in the "default" section.
("string")
The destination directory where this mirror should done. Probably inside your public ftp tree.
path = /var/ftp/pub/mirrors/a_software/
("string")
The url of the the computer hosting the tree mmm should stay synched. It should be a valid url, either using rsync or ftp protocol.
url = rsync://any.host.com/share/ url = ftp://any.host.com/pub/mirrors/a_software/
This field is optionnal if "source" filed is set.
("delay")
The time between two synchronisation (start of process), in minute (I hope nobody is crazy enough to sync more the one time a minute).
period = 120
which can also be setup as
period = 2h
("yes/no")
The task is not run, neither show in report, like it was not setup.
disable = no
("delay")
A minimum delay in minutes between the end of a task and the beginning of the next one. This is usefull to avoid overload on remote server when a process has taken likelly the "period" time.
waitafter = 10
("string")
A directory to store temporary files. This option make rsync to be called with --temp-dir option, this setup the TMPDIR environnement variable with mirrordir.
tempdir = /tmp
("string")
With rsync only, a directory where partially transfered files are store. See --partial-dir and --partial rsync options.
partialdir = /tmp
("yes/no")
Should we remove old files that does not exists anymore on remote server ? In most of case, would be true.
delete = yes
("yes/no")
With rsync only, make file to be deleted at the end of synchronisation.
delete-after = no
("string")
Can be setup if the server need a password to access to share. This allow to not include the password in "url" as it can appear by some way.
It is passed an environnement variable to rsync, with --passord argument to mirrordir.
password = anypassword
("yes/no")
This parameter allow to use rsync over ssh. This requires to setup ssh keys to login w/o password. See ssh documentation for more detail.
rsync_use_ssh = no
("yes/no")
When set, make mmm calculating the size of the tree. This result is done by du -s and is always performed after a synchronization.
compute_size = no
See also "size_delay".
("delay")
When "compute_size" is set, set the time between two size update.
size_delay = 12h
("string")
Path an execute program or script to execute before processing the synchronization.
The script is called with this argument:
pre_exec = /path/to/script
("string")
Path an execute program or script to execute before processing the synchronization.
The script is called with this argument:
This envirronement variable are set:
Set to 1 if synchronization succeed, 0 on failure
The mirror hostname used, if success.
The url used if success.
Example:
post_exec = /path/to/script
Example of script: setting debian trace:
#!/bin/sh
export LC_ALL=C
mpath=${2}
[ "${MMM_RESULT}" == 1 ] || exit 0
date -u > ${mpath}/project/trace/`hostname -f`

Olivier Thauvin <nanardon@nanardon.zarb.org>

Copyright (C) 2006 Olivier Thauvin
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.