You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
609 B

#!/bin/bash
RCODE=$?
if [ ! whoami = "zimbra" ]; then
echo "Le user doit être zimbra, pas root ! "
exit 1;
fi
echo "Export mailboxes :"
for user in `cat /opt/zimbra/nfsbackup/migration/accounts/users.txt`;
do
echo "Exporting mailbox : $user" ;zmmailbox -z -t 0 -m $user getRestURL -u "https://127.0.0.1:7071" "//?fmt=tgz" > /opt/zimbra/nfsbackup/migration/archives/$user.tgz;
done
if [ $RCODE -eq 1 ]; then
echo "erreur dans l'export'"
exit 1;
fi
if [ $RCODE -eq 0 ]; then
echo "Export terminée'"
echo "Lancer import sur serveur de destination"
exit;
fi