--- /usr/sbin/univention-samba4-backup 2022-11-21 10:23:01.000000000 +0100 +++ univention-samba4-backup 2022-12-27 14:06:25.388375524 +0100 @@ -129,7 +129,7 @@ cd $FROMWHERE for d in $DIRS; do - relativedirname=`find . -type d -name "$d" -prune` + relativedirname=`find . -maxdepth 1 -type d -name "$d" -prune` # IMPORTANT: added -maxdepth 1 to avoid getting other dirs called "private" further down the tree, e.g. deep in the sysvol dir n=`echo $d | sed 's/\//_/g'` if [ "$d" = "private" ]; then for db in tdb ldb; do @@ -143,7 +143,12 @@ tdbbackup $file Status=$? if [ $Status -ne 0 ]; then - terminate_on_error "Error while backing up $file with tdbbackup - status $Status" + echo "Error while backing up $file with tdbbackup - status $Status - will try mdb_copy in case MDB format is used" >&2 + mdb_copy -c -n $file > $file.bak + Status=$? + if [ $Status -ne 0 ]; then + terminate_on_error "Error while backing up $file with mdb_copy - status $Status" + fi fi fi done