NAME

mmm.cfg - Main configuration file for mmm

DESCRIPTION

SYNTAXE

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/

FIELDS TYPE

string

The field accept any string. The meaning depend of paramter type.

yes/no

This field are boolean. Several keywords are accepted:

    yes  / no
    true / false
    on   / off
    1    / 0

delay

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)

GLOBAL PARAMETERS

All these parameters goes into the default section.

MANDATORY FIELD

statedir

("string")

The directory where mmm will store data and cache about its jobs.

    statedir = @LOCALSTATEDIR@/mmm

pidfile

("string")

Use by mmmd only. The path of a file to keep a pointer of the current mmmd PID.

    pidfile = /var/run/mmm.pid

OPTIONNALS FIELD

mirrordir

("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

TASK PARAMETERS

All this parameters can be setup in the "default" section.

MANDATORY FIELD

path

("string")

The destination directory where this mirror should done. Probably inside your public ftp tree.

    path = /var/ftp/pub/mirrors/a_software/

url

("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.

period

("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

OPTIONNALS FIELD

disable

("yes/no")

The task is not run, neither show in report, like it was not setup.

    disable = no

waitafter

("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

tempdir

("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

partialdir

("string")

With rsync only, a directory where partially transfered files are store. See --partial-dir and --partial rsync options.

    partialdir = /tmp

delete

("yes/no")

Should we remove old files that does not exists anymore on remote server ? In most of case, would be true.

    delete = yes

delete-after

("yes/no")

With rsync only, make file to be deleted at the end of synchronisation.

    delete-after = no

password

("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

rsync_use_ssh

("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

compute_size

("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".

size_delay

("delay")

When "compute_size" is set, set the time between two size update.

    size_delay = 12h

pre_exec

("string")

Path an execute program or script to execute before processing the synchronization.

The script is called with this argument:

The name of task
The path of the mirrored tree
    pre_exec = /path/to/script

post_exec

("string")

Path an execute program or script to execute before processing the synchronization.

The script is called with this argument:

The name of task
The path of the mirrored tree

This envirronement variable are set:

MMM_RESULT

Set to 1 if synchronization succeed, 0 on failure

MMM_MIRROR

The mirror hostname used, if success.

MMM_URL

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`

AUTHOR

Olivier Thauvin <nanardon@nanardon.zarb.org>

COPYRIGHT AND LICENSE

    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.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 320:

=cut found outside a pod block. Skipping to next block.