Editing v-backup-user
-
- Posts: 27
- Joined: Thu Aug 13, 2015 3:53 pm
- Os: CentOS 5x
- Web: apache
Editing v-backup-user
I want to exlude mail data (actual mails in webmail) when doing all user backup. Because it take much storage and also client using their mail with pop access so store their mail in their outlook. But want to backup mail account along with password for restore.
Can I edit v-backup-user and comment out:
Can I edit v-backup-user and comment out:
Code: Select all
# Backup emails
cd $HOMEDIR/$user/mail/$domain_idn
accounts=()
for account in $(ls); do
exclusion=$(echo "$MAIL" |tr ',' '\n' |grep "$domain:")
exclusion=$(echo "$exclusion" |tr ':' '\n' |grep "^$account$")
# Checking exlusions
if [ -z "$exclusion" ] && [[ "$MAIL_SYSTEM" =~ exim ]]; then
accounts+=($account)
else
echo "$(date "+%F %T") excluding mail account $account" |\
tee -a $BACKUP/$user.log
fi
done
# Compress archive
if [ ${#accounts[@]} -gt 0 ]; then
tar -cpf- ${accounts[@]} |gzip -$BACKUP_GZIP - > $tmpdir/mail/$domain/accounts.tar.gz
fi
-
- Support team
- Posts: 1111
- Joined: Tue Jul 30, 2013 10:18 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Editing v-backup-user
Yes, you can.