oehrlis / oudbase

OUD base environment scripts
Apache License 2.0
6 stars 1 forks source link

oud_export.sh can not handle multiple backends #67

Closed oehrlis closed 4 years ago

oehrlis commented 4 years ago

The current ´´oud_export.sh´´ can not handle multiple backends. Currently is just exports the default / UserRoot backend.

oehrlis commented 4 years ago

add new feature to collect backend information. By default oud_export.sh will export all backends with a base DN except the internal backends. Internal backends are the following:

So by default oud_export.sh will backup all other backends.

There is also a new parameter -b. This parameter explicitly allows to specify a backend to backup.

Usage, oud_export.sh [-hv -i <OUD_INSTANCES> -b <BACKENDS> -m <MAILADDRESSES>]
    -h                 Usage (this message
    -v                 enable verbose mode
    -i <OUD_INSTANCES> List of OUD instances (comma separated)
    -b <BACKENDS>      List of OUD instances default all (semi-comma seperated)
    -m <MAILADDRESSES> List of Mail Addresses (comma separated)
    -o                 force to send mails. Requires -m <MAILADDRESSES>
    -c                 Compress LDIF file (default no compression)
    -k <DAYS>          Number of days to keep old exports (default 7)
    -D <BINDDN>        Bind DN used for the export (default: cn=Directory Manager)
    -j <PWDFILE>       Password file used for the export (default: $PWD_FILE)
    -f <EXPORTPATH>    Directory used to store the exports (default: $OUD_EXPORT_DIR)
Logfile : /u01/log/oud_export.log

Dedicated backends can be exported by specifying -b although the backends have to be correctly escaped and separated by a semicolone e.g. -b "OracleContext0;monitor"