Backups the files to a zip file.
String zipName = FileUtils.safeGetCanonicalPath(request.backupFile);
String domainDirName = FileUtils.safeGetCanonicalPath(request.domainDir);
FileListerRelative lister = new FileListerRelative(request.domainDir);
lister.keepEmptyDirectories(); // we want to restore any empty directories too!
String[] files = lister.getFiles();
LoggerHelper.fine("Writing " + zipName);
try
{
ZipWriter writer = new ZipWriter(zipName, domainDirName, files);
if(request.excludeDirs != null && request.excludeDirs.length > 0)
writer.excludeDirs(request.excludeDirs);
writer.safeWrite();
}
catch(ZipFileException zfe)
{
throw new BackupException("backup-res.ZipBackupError", zfe, zipName);
}