Search in sources :

Example 1 with BackupRequest

use of com.sun.enterprise.backup.BackupRequest in project Payara by payara.

the class BackupCommands method prepareRequest.

protected void prepareRequest() throws CommandValidationException {
    File backupdir_f = null;
    if (backupdir != null) {
        backupdir_f = new File(backupdir);
        if (!backupdir_f.isAbsolute()) {
            throw new CommandValidationException(strings.get("InvalidBackupDirPath", backupdir));
        }
    }
    boolean configonlybackup = false;
    if ((configonly != null) && (Boolean.valueOf(configonly))) {
        configonlybackup = true;
    }
    request = new BackupRequest(domainDirParam, domainName, backupdir_f, backupConfig, desc, recycleLimit, configonlybackup);
    request.setTerse(programOpts.isTerse());
    request.setVerbose(verbose);
}
Also used : BackupRequest(com.sun.enterprise.backup.BackupRequest)

Example 2 with BackupRequest

use of com.sun.enterprise.backup.BackupRequest in project Payara by payara.

the class RestoreDomainCommand method initRequest.

private void initRequest() throws CommandValidationException {
    File backupdir_f = null;
    if (backupdir != null) {
        backupdir_f = new File(backupdir);
        if (!backupdir_f.isAbsolute()) {
            throw new CommandValidationException(strings.get("InvalidBackupDirPath", backupdir));
        }
    }
    boolean configonlybackup = false;
    if ((configonly != null) && (Boolean.valueOf(configonly))) {
        configonlybackup = true;
    }
    request = new BackupRequest(domainDirParam, domainName, backupdir_f, backupConfig, backupFilename, configonlybackup);
    request.setTerse(programOpts.isTerse());
    request.setVerbose(verbose);
    request.setForce(force);
}
Also used : BackupRequest(com.sun.enterprise.backup.BackupRequest) CommandValidationException(org.glassfish.api.admin.CommandValidationException) File(java.io.File)

Aggregations

BackupRequest (com.sun.enterprise.backup.BackupRequest)2 File (java.io.File)1 CommandValidationException (org.glassfish.api.admin.CommandValidationException)1