View | Details | Raw Unified | Return to bug 55535
Collapse All | Expand All

(-)/usr/sbin/univention-samba4-backup (-2 / +7 lines)
Lines 129-135 Link Here
129
129
130
cd $FROMWHERE
130
cd $FROMWHERE
131
for d in $DIRS; do
131
for d in $DIRS; do
132
	relativedirname=`find . -type d -name "$d" -prune`
132
	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
133
	n=`echo $d | sed 's/\//_/g'`
133
	n=`echo $d | sed 's/\//_/g'`
134
	if [ "$d" = "private" ]; then
134
	if [ "$d" = "private" ]; then
135
		for db in tdb ldb; do
135
		for db in tdb ldb; do
Lines 143-149 Link Here
143
					tdbbackup $file
143
					tdbbackup $file
144
					Status=$?
144
					Status=$?
145
					if [ $Status -ne 0 ]; then
145
					if [ $Status -ne 0 ]; then
146
						terminate_on_error "Error while backing up $file with tdbbackup - status $Status"
146
						echo "Error while backing up $file with tdbbackup - status $Status - will try mdb_copy in case MDB format is used" >&2
147
						mdb_copy -c -n $file > $file.bak
148
						Status=$?
149
						if [ $Status -ne 0 ]; then
150
						    terminate_on_error "Error while backing up $file with mdb_copy - status $Status"
151
						fi
147
					fi
152
					fi
148
				fi
153
				fi
149
			done
154
			done

Return to bug 55535