• This is default featured slide 1 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

VMWare ESX: Error IP Address is already assigned to another adapter

01. Open command prompt and type: set devmgr_show_nonpresent_devices=1
02. Still during you’re in the command window type: devmgmt.msc
How to error message This IP adress is alreay assigned to another adapter
03. Now when you open Device Manager and in the menu you’ll choose show hidden devices, you’ll see all the devices which are no longer present in the VM and you can remove them
Share:

Zimbra export import mailbox


To export the mailbox for user@domain.com as a zip file use this command:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL \
‘//?fmt=zip&query=is:anywhere’ > user_at_domain.com.zip
Here is the same as a tgz file:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com getRestURL \
“//?fmt=tgz” > /tmp/account.tgz
And here’s a restore of the tgz file:
/opt/zimbra/bin/zmmailbox -z -m user@domain.com postRestURL \
“//?fmt=tgz&resolve=reset” /tmp/account.tgz
Share:

Zimbra script backup restore


BACKUP

Script 1 This script must be run as root, it runs the script runBackupAll.sh and also sends the entire backup to a second machine.
echo "*******************************************************"
echo "*     Zimbra - Backup all email accounts              *"
echo "*******************************************************"
echo""
#
echo Start time of the backup = $(date +%T)  
before="$(date +%s)"
#
echo ""
ZHOME=/opt/zimbra
ZBACKUP=$ZHOME/backup/mailbox
echo "Generating backup files ..."
su - zimbra -c "/opt/backup/SCRIPT_ZIBRA_BACKUP_ALL_ACCOUNTS/zimbra_backup_allaccounts.sh"
echo "Sending files to backup all email accounts for Machine2 ..."
rsync -avH $ZBACKUP root@ipaddress:/backup/zimbra_backup_accounts
before2="$(date +%s)"
#
echo The process lasted = $(date +%T)
# Calculating time
after="$(date +%s)"
elapsed="$(expr $after - $before)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo The complete backup lasted : "$hours hours $minutes minutes $seconds seconds"
Script 2 zimbraBackupAllAccounts.sh
ZHOME=/opt/zimbra
ZBACKUP=$ZHOME/backup/mailbox
ZCONFD=$ZHOME/conf
DATE=`date +"%a"`
ZDUMPDIR=$ZBACKUP/$DATE
ZMBOX=/opt/zimbra/bin/zmmailboxif [ ! -d $ZDUMPDIR ]; then
mkdir -p $ZDUMPDIRfi
echo " Running zmprov ... "
       for mbox in `zmprov -l gaa`
do
echo " Generating files from backup $mbox ..."
       $ZMBOX -z -m $mbox getRestURL "//?fmt=zip" > $ZDUMPDIR/$mbox.zipdone

RESTORE

Script 3 This script must be run as root, it runs the script runRestoreAll.sh and also sends the entire backup to machine. zimbra_restore_allaccounts.sh
echo "*******************************************************"
echo "*    Zimbra - Restore all email accounts              *"
echo "*******************************************************"
echo ""
#
echo Start Time Restore = $(date +%T)         
before="$(date +%s)"
#
echo ""
echo "Starting the process restore the backup files ..."
su - zimbra -c "/opt/zimbra_backup_accounts/zimbra_restore_allaccounts.sh"
before2="$(date +%s)"
echo The process lasted = $(date +%T)
# Calculating time
after="$(date +%s)"
elapsed="$(expr $after - $before)"
hours=$(($elapsed / 3600))
elapsed=$(($elapsed - $hours * 3600))
minutes=$(($elapsed / 60))
seconds=$(($elapsed - $minutes * 60))
echo "The complete restore lasted : "$hours hours $minutes minutes $seconds seconds"
echo "Process completed successfully!"
Script 4 zimbra_restore_allaccounts.sh
#!/bin/bash
ZHOME=/opt/zimbra#!/bin/bash
ZHOME=/opt/zimbra#ZBACKUP=$ZHOME/backup/mailbox
ZBACKUP=/opt/zimbra_backup_accounts/mailbox
ZCONFD=$ZHOME/conf
DATE=`date +"%a"`
ZDUMPDIR=$ZBACKUP/$DATE
ZMBOX=/opt/zimbra/bin/zmmailboxif [ ! -d $ZDUMPDIR ]; then
echo "Backups do not exist !"
exit 255;
fi
for mbox in `zmprov -l gaa`
do
echo " Restoring files from backup $mbox ..."
$ZMBOX -z -m $mbox postRestURL "//?fmt=zip&resolve=reset" $ZDUMPDIR/$mbox.zipdone
Share:

Zimbra script backup


#!/bin/bash
### START CONFIGURATION ###
DIR="/tmp/zimbra";
OUTPUT="/tmp/zimbra";
### END OF CONFIGURATION ###
USERS=`su - zimbra -c 'zmprov gaa'`;
DATE=`date +%Y%m%d`;
if [ ! -d $DIR ]; then mkdir $DIR; chown zimbra:zimbra $DIR; fi
for ACCOUNT in $USERS; do
NAME=`echo $ACCOUNT | awk -F@ '{print $1}'`;
su - zimbra -c "zmmailbox -z -m $ACCOUNT getRestURL '//?fmt=tgz' > $DIR/$NAME.tgz";
done
cd $DIR; mkdir $DATE; mv *.tgz $DATE
tar cjpf $OUTPUT/$DATE.tar.bz2 $DATE;
cd $DIR; rm -rf $DATE
Share:

Popular Posts