Skip to content

Commit

Permalink
Rename ldif to ldiff
Browse files Browse the repository at this point in the history
  • Loading branch information
lucascbeyeler committed Dec 8, 2020
1 parent a899822 commit 8630e97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Restore Backup Options:
-a, --account : Execute a backup of only a set of accounts, comma separated
```

To execute a full backup routine, which include by default the mailbox and the ldif, just run the script with the option **-f** or **--full**. Depending of the ammount of accounts or the number of proccess you set in the option **MAX_PARALLEL_PROCESS**, this will take sometime before conclude.
To execute a full backup routine, which include by default the mailbox and the ldiff, just run the script with the option **-f** or **--full**. Depending of the ammount of accounts or the number of proccess you set in the option **MAX_PARALLEL_PROCESS**, this will take sometime before conclude.

```
$ zmbackup -f
Expand Down
2 changes: 1 addition & 1 deletion project/lib/bash/NotifyAction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function notify_finish()
if [[ "$1" == "mbox"* ]]; then
QTDE=$(find "$WORKDIR"/"$1"/*.tgz | wc -l)
else
QTDE=$(find "$WORKDIR"/"$1"/*.ldif | wc -l)
QTDE=$(find "$WORKDIR"/"$1"/*.ldiff | wc -l)
fi
else
SIZE=0
Expand Down
6 changes: 3 additions & 3 deletions project/lib/bash/ParallelAction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function ldap_backup()
{
TEMP_CLI_OUTPUT=$(mktemp)
ldapsearch -Z -x -H "$LDAPSERVER" -D "$LDAPADMIN" -w "$LDAPPASS" -b '' \
-LLL "(&(|(mail=$1)(uid=$1))$2)" > "$TEMPDIR"/"$1".ldif 2> "$TEMP_CLI_OUTPUT"
-LLL "(&(|(mail=$1)(uid=$1))$2)" > "$TEMPDIR"/"$1".ldiff 2> "$TEMP_CLI_OUTPUT"
BASHERRCODE=$?
if [[ $BASHERRCODE -eq 0 ]]; then
logger -i -p local7.info "Zmbackup: LDAP - Backup for account $1 finished."
Expand Down Expand Up @@ -80,9 +80,9 @@ function mailbox_backup()
function ldap_restore()
{
ldapdelete -r -x -H "$LDAPSERVER" -D "$LDAPADMIN" -c -w "$LDAPPASS" \
"$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldif | awk 'print $2')" > /dev/null 2>&1
"$(grep ^dn: "$WORKDIR"/"$1"/"$2".ldiff | awk 'print $2')" > /dev/null 2>&1
ERR=$( (ldapadd -x -H "$LDAPSERVER" -D "$LDAPADMIN" \
-c -w "$LDAPPASS" -f "$WORKDIR"/"$1"/"$2".ldif) 2>&1)
-c -w "$LDAPPASS" -f "$WORKDIR"/"$1"/"$2".ldiff) 2>&1)
BASHERRCODE=$?
if ! [[ $BASHERRCODE -eq 0 ]]; then
printf "\nError during the restore process for account %s. Error message below:" "$2"
Expand Down

0 comments on commit 8630e97

Please sign in to comment.