Search in sources :

Example 1 with BackupException

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

the class BackupDomainCommand method executeCommand.

/**
 */
@Override
protected int executeCommand() throws CommandException {
    try {
        BackupManager mgr = new BackupManager(request);
        logger.info(mgr.backup());
    } catch (BackupWarningException bwe) {
        logger.info(bwe.getMessage());
    } catch (BackupException be) {
        throw new CommandException(be);
    }
    return 0;
}
Also used : BackupException(com.sun.enterprise.backup.BackupException) BackupWarningException(com.sun.enterprise.backup.BackupWarningException) CommandException(org.glassfish.api.admin.CommandException) BackupManager(com.sun.enterprise.backup.BackupManager)

Example 2 with BackupException

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

the class ListBackupsCommand method executeCommand.

@Override
protected int executeCommand() throws CommandException {
    try {
        ListManager mgr = new ListManager(request);
        logger.info(mgr.list());
    } catch (BackupWarningException bwe) {
        logger.info(bwe.getMessage());
    } catch (BackupException be) {
        throw new CommandException(be);
    }
    return 0;
}
Also used : BackupException(com.sun.enterprise.backup.BackupException) ListManager(com.sun.enterprise.backup.ListManager) BackupWarningException(com.sun.enterprise.backup.BackupWarningException) CommandException(org.glassfish.api.admin.CommandException)

Example 3 with BackupException

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

the class RestoreDomainCommand method executeCommand.

/**
 */
@Override
protected int executeCommand() throws CommandException {
    try {
        RestoreManager mgr = new RestoreManager(request);
        logger.info(mgr.restore());
    } catch (BackupWarningException bwe) {
        logger.info(bwe.getMessage());
    } catch (BackupException be) {
        throw new CommandException(be);
    }
    return 0;
}
Also used : BackupException(com.sun.enterprise.backup.BackupException) BackupWarningException(com.sun.enterprise.backup.BackupWarningException) RestoreManager(com.sun.enterprise.backup.RestoreManager) CommandException(org.glassfish.api.admin.CommandException)

Aggregations

BackupException (com.sun.enterprise.backup.BackupException)3 BackupWarningException (com.sun.enterprise.backup.BackupWarningException)3 CommandException (org.glassfish.api.admin.CommandException)3 BackupManager (com.sun.enterprise.backup.BackupManager)1 ListManager (com.sun.enterprise.backup.ListManager)1 RestoreManager (com.sun.enterprise.backup.RestoreManager)1