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.
 
 
 
 

35 lines
971 B

#!/bin/bash
echo "saisir le nom du compte :"
read user
PS3="choix du dossier d'archivage : "
options=("archivage_zimbra-cli" "archivage_zimbran" "archivage_zimbra-pro-edu" "archivage_zimbrapro" "Quit")
select opt in "${options[@]}"
do
case $opt in
"archivage_zimbra-cli")
echo "archivage_zimbra-cli"
;;
"archivage_zimbran")
echo "archivage_zimbran"
;;
"archivage_zimbra-pro-edu")
echo "archivage_zimbra-pro-edu"
;;
"archivage_zimbrapro")
echo "archivage_zimbrapro"
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
break
done
chown zimbra:zimbra /opt/zimbra/nfsbackup/archivage/$opt/
su - zimbra -c "echo 'Exporting mailbox $user' ; zmmailbox -z -m ${user} getRestURL -u 'https://127.0.0.1:7071' '//?fmt=tgz&resolve=skip' > /opt/zimbra/nfsbackup/archivage/${opt}/${user}.tgz ;"
exit