Examples of FBBackupManager


Examples of org.firebirdsql.management.FBBackupManager

      if (!jcheckboxBckTransportable.isSelected())
        options += FBBackupManager.BACKUP_NON_TRANSPORTABLE;
      if (!jcheckboxBckNoDataCompression.isSelected())
        options += FBBackupManager.BACKUP_EXPAND;

      FBBackupManager bckManager = new FBBackupManager();
      bckManager.setBackupPath(jtextfieldBckBackupFile.getText());
      bckManager.setDatabase(jtextfieldBckDBFile.getText());
      bckManager.setHost(jtextfieldBckDBHost.getText());
      bckManager.setPort(Integer.parseInt(jtextfieldBckPort.getText()));
      bckManager.setUser(jtextfieldUsername.getText());
      bckManager.setPassword(new String(jpasswordfieldPW.getPassword()));
     
      TextAreaOutputStream textOutputStream = new TextAreaOutputStream(jtextareaProcess, jscrollpaneProcess);
    bckManager.setLogger(textOutputStream);
    bckManager.setVerbose(jcheckboxDisplayProcess.isSelected());

    try {
      jtextareaProcess.setText("");
      if (jcheckboxBckMetadataOnly.isSelected()) {
        bckManager.backupMetadata();
      } else {
        bckManager.backupDatabase(options);
      }
      jtextareaProcess.append(i18n.INFO_BACKUP_COMPLETED);
      saveSessionPreferences();
    } catch (SQLException e) {
      jtextareaProcess.append(e.getLocalizedMessage()+ CR + i18n.INFO_BACKUP_CANCELED);
View Full Code Here

Examples of org.firebirdsql.management.FBBackupManager

      if (jcheckboxResOneTableAtTime.isSelected())
        options += FBBackupManager.RESTORE_ONE_AT_A_TIME;
      if (jcheckboxResUseAllSpace.isSelected())
        options += FBBackupManager.RESTORE_USE_ALL_SPACE;
     
      FBBackupManager bckManager = new FBBackupManager();
      if (jcheckboxResPageSize.isSelected())
        bckManager.setRestorePageSize(Integer.parseInt(jtextfieldPageSize.getText()));
      bckManager.setRestoreReplace(jcheckboxResReplaceDatabase.isSelected());
     
      bckManager.setBackupPath(jtextfieldResBackupFile.getText());
      bckManager.setDatabase(jtextfieldResDBFile.getText());
      bckManager.setHost(jtextfieldResDBHost.getText());
      bckManager.setPort(Integer.parseInt(jtextfieldResPort.getText()));
      bckManager.setUser(jtextfieldUsername.getText());
      bckManager.setPassword(new String(jpasswordfieldPW.getPassword()));

     
      TextAreaOutputStream textOutputStream = new TextAreaOutputStream(jtextareaProcess, jscrollpaneProcess);
    bckManager.setLogger(textOutputStream);
    bckManager.setVerbose(jcheckboxDisplayProcess.isSelected());

    try {
      jtextareaProcess.setText("");
      if (options == 0) {
        bckManager.restoreDatabase();
      } else {
        bckManager.restoreDatabase(options);
      }
      jtextareaProcess.append(i18n.INFO_RESTORE_COMPLETED);
    } catch (SQLException e) {
      jtextareaProcess.append(e.getLocalizedMessage()+ CR + i18n.INFO_RESTORE_CANCELED);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.