BackUp tests

Discuss Scalix Management Services ( formerly Scalix Admin Console )

Moderator: ScalixSupport

qola

BackUp tests

Postby qola » Wed Mar 25, 2009 10:23 am

Hi

Im using a backup script stolen from this site i think and it works to backup the folders:

#! /bin/bash

# Edit the following two values if necessary
MBOXDIR="/root/backups/mailboxes"
SXDIR="/opt/scalix/bin"
# No more editing after this line

echo "Mailbox Backup Starting [`date`]"
if [ -d $MBOXDIR ]; then
echo "Found Backup Directory ${MBOXDIR}. Using It."
else
echo "Creating Backup Directory ${MBOXDIR} to backup mailboxes."
mkdir -p ${MBOXDIR}
fi
for i in $(${SXDIR}/omshowu -m all | cut -d "/" -f 1 | sed -e 's: $::g' -e 's/ /\//g'); do
user=`printf "$i" | sed -e 's:/: :g'`
#
# $user = Username With Space
# $i = Username With \ Before Space
# ex: $user="Firstname Lastname"
# ex: $i="Firstname\ Lastname"
#
echo
echo +++++++++++++++++++++++++++++++++++++++++++++
echo ${user}
if [ -a $MBOXDIR/$i.mbox ]; then
echo "Existing backup found. Deleting before creating new backup."
rm -f ${MBOXDIR}/${user}.mbox
fi
echo "Backing up user ${user}"
nice -n 19 ${SXDIR}/sxmboxexp -u "${user}" -a ${MBOXDIR}/"${user}".mbox --listlevel folder -F
echo +++++++++++++++++++++++++++++++++++++++++++++
done
echo
echo "Finished backing up user data."
echo
echo
echo "Backing up public folders..."
if [ -a $MBOXDIR/public_folders.mbox ]; then
echo "Existing backup found. Deleting before creating new backup."
rm -f ${MBOXDIR}/public_folders.mbox
fi
nice -n 19 ${SXDIR}/sxmboxexp -p -a ${MBOXDIR}/public_folders.mbox --listlevel folder -F
echo "Done with mailbox backup! [`date`]"
echo

I check that i can see the backup files are in place.
I use omshowu John Doe and its there.

Now i want to test the backup so i removed an account with omdelu John Doe and voila its gone. So i use:
sxmboximp -a "/backup/mailboxes/John Doe.mbox"
to get it back but i get:
sxmboximp : [OM.PM 3024] Cannot find user John Doe /mail/CN=Doe, John

Any ideas?

Regards
/Henrik

axslingr
Posts: 65
Joined: Mon Mar 19, 2007 11:39 am
Location: Arkansas, United States

Postby axslingr » Wed Mar 25, 2009 11:06 am

You have to recreate the account before you can import.

Lance

ls-al
Scalix Star
Scalix Star
Posts: 510
Joined: Tue Jun 29, 2004 8:28 am
Location: Leipzig, Germany
Contact:

Postby ls-al » Wed Mar 25, 2009 11:30 am

When using "sxmboximp -a filename" the target has to exist with exactly the same name (S/G/../OU1../CN).
Otherwise you will have to use the -u/--user option to choose a different target.


Return to “Scalix Management Services”



Who is online

Users browsing this forum: No registered users and 1 guest