NAUbackup / VmBackup

XenServer simple backup script
228 stars 61 forks source link

email fix #14

Closed jnfnt closed 8 years ago

jnfnt commented 8 years ago

Hi guys,

I've just tweaked VmBackup at our site to make the email notification work, there are a couple of problems with the (commented) email code in the original script. Diff is below if you'd like to incorporate them:

33c33

< import sys, time, os, datetime, subprocess, re, shutil, XenAPI

import sys, time, os, datetime, subprocess, re, shutil, XenAPI, smtplib 36a37 from email.MIMEText import MIMEText 360c361

< send_email("%s 'ERROR VmBackup.py' %s" % (MAIL_TO_ADDR, STATUS_LOG))

        send_email(MAIL_TO_ADDR, "ERROR VmBackup.py", STATUS_LOG)

367c368

< send_email("%s 'Warning VmBackup.py' %s" % (MAIL_TO_ADDR, STATUS_LOG))

        send_email(MAIL_TO_ADDR, "Warning VmBackup.py", STATUS_LOG)

374c375

< send_email("%s 'Success VmBackup.py' %s" % (MAIL_TO_ADDR, STATUS_LOG))

        send_email(MAIL_TO_ADDR, "Success VmBackup.py", STATUS_LOG)

524,525c525,526 < s = smtplib.SMTP(MAIL_SMTP_SERVER)

< s.sendmail(from_addr, to.split(','), msg.as_string())

s = smtplib.SMTP(MAIL_SMTP_SERVER, local_hostname="localhost")
s.sendmail(MAIL_FROM_ADDR, to.split(','), msg.as_string())
mkaliyannan commented 8 years ago

I was wondering is there any way to do CBT ( differential backup ) changes ? If this feature would be added will be nice. I tried xdelta3 to diff, but i have no luck

NAUbackup commented 8 years ago

On the email fix, we have a new version coming soon and will update the email code.

At this time we are not planning on differential backup feature. But using the xe vdi-export command you could do differential backups. see http://wiki.xensource.com/wiki/Disk_import/export_APIs