super.init();
if(request.backupFile != null)
throw new BackupException("backup-res.InternalError", "No backupFilename may be specified for a backup -- it is reserved for restore operations only.");
if(!FileUtils.safeIsDirectory(request.domainDir))
throw new BackupException("backup-res.NoDomainDir", request.domainDir);
File backupDir = new File(request.domainDir, Constants.BACKUP_DIR);
// not an error for this directory to not exist yet
backupDir.mkdirs();
// NOW it's an error to not exist...
if(!FileUtils.safeIsDirectory(backupDir))
throw new BackupException("backup-res.NoBackupDirCantCreate", backupDir);
String ts = "" + request.timestamp + ".zip";
BackupFilenameManager bfmgr = new BackupFilenameManager(backupDir);
request.backupFile = bfmgr.next();
//request.backupFile = new File(backupDir, ts);