How To Backup Mail Zimbra By Date
----------------------------------------------------------------------
Buat Folder contohnya : backup_tgz
Buat nama-nama akun email list dalam bentuk txt contoh : list_account.txt
jadi dialam list_account.txt nama2 email yang mau di backup
lalu buat sricpt seperti ini
------------------------------------------------------
#!/bin/bash
echo "========================"
echo "Subcrice Kuzwanovic Official"
echo "========================"
echo "by babu cibadak"
echo "========================"
echo "=START=================="
polder=./backup_tgz
list_account_txt=./list_account.txt
file_backup_ext=tgz
echo "=GET=TOTAL=ACCOUNTS====="
total_acc=0
while IFS= read -r line; do
total_acc=$((total_acc+1))
done < "$list_account_txt"
echo "Total Account: $total_acc"
total_poin=0
while IFS= read -r line; do
total_poin=$((total_poin+1))
echo "GET BACKUP... ($total_poin/$total_acc)"
email_only="$line"
echo "TARGET EMAIL: $email_only"
#touch ./$polder/$line
zmmailbox -z -m $email_only gru '//?fmt=tgz&query=after:"03/07/22" and before:"04/02/22"' > $polder/$line.tgz
#zmmailbox -z -m "$email_only" gru '/?fmt=tgz%26query%3Dafter%3A%2203%2F07%2F22%22%20and%20before%3A%2204%2F02%2F22%22' > ./$polder/$line || echo "ERROR!!"
#zmmailbox -z -m $email_only gru '/?fmt=tgz&amp;resolve=reset' > ./$polder/$line || echo "ERROR!!"
#zmmailbox -z -m $email_only getRestURL '//?fmt=tgz' > ./$polder/$line || echo "ERROR!"
echo "OK!"
echo " "
echo " "
done < "$list_account_txt"
echo "=END===================="
----------------------------------------------------------------------------------------------------------
lalu save misal backup_date.sh
Pastikan semua hak aksesnya milik zimbra yaa, Format date nya itu Bulan - Tanggal - Tahun ya gesss
Lalu jalankan script tersebut dengan command ./backup_date.sh
Dan Selesai
Subcribe Youtube Kuzwanovic Official
Tidak ada komentar:
Posting Komentar