¿what is the command line to export and import an account of a domain from one server to another?
(to do the same as the preferences account ==> import /export)
Thx
Command to export and import account data
Command to export and import account data
can only be done from preferences ==> Import / Export? I would like to make a script for a massive export of a domain in bash command line.
Thx
Thx
Command to export and import account data
Im going to do it with:
/usr/bin/curl -s -k -u admin:password https://zimbraserver:7071/home/${ACCOUNT}@yourdomain.de/?fmt=tgz | /bin/zcat | /bin/gzip -9 --rsyncable > ${TEMPDIR}/${ACCOUNT}/${ACCOUNT}.tgz
(cd ${TEMPDIR} && /usr/bin/rdiff-backup ${ACCOUNT} ${BACKUPDIR}/${ACCOUNT} )
/usr/bin/curl -s -k -u admin:password https://zimbraserver:7071/home/${ACCOUNT}@yourdomain.de/?fmt=tgz | /bin/zcat | /bin/gzip -9 --rsyncable > ${TEMPDIR}/${ACCOUNT}/${ACCOUNT}.tgz
(cd ${TEMPDIR} && /usr/bin/rdiff-backup ${ACCOUNT} ${BACKUPDIR}/${ACCOUNT} )
Command to export and import account data
And... does it work? Is it a reliable way to command line account export from ZCS?
Re: Command to export and import account data
Hola este script me ayudo a exportar todo los usuarios de zimbra en un archivo tgz, este mismo scripts esta en este foro,
Lo que no pude es como importar luego esos archivos, si alguien tuviera ese scripts estare muy agradecido,
Espero que les sirva!
Code: Select all
#!/bin/bash
for i in `zmprov gqu localhost | grep example.com|awk {'print $1'}`; do
echo $i
file=`echo $i | awk -F '@' '{print $1}'`
/opt/zimbra/bin/zmmailbox -z -t 0 -m "${i}" getRestURL -u "https://mail.example.com" "//?fmt=tgz" > /tmp/${file}.tgz
done
Lo que no pude es como importar luego esos archivos, si alguien tuviera ese scripts estare muy agradecido,
Espero que les sirva!
Who is online
Users browsing this forum: snowymoountain and 14 guests