Examples of BackupConfig


Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {

      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      String fullbackupType = null;
     
      try
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

         File backupDir = new File(bConfigBeen.getBackupDir());
         if (!backupDir.exists())
            throw new BackupDirNotFoundException("The backup folder not exists :  "
+ backupDir.getAbsolutePath());

         BackupConfig config = new BackupConfig();
         config.setBackupType(bConfigBeen.getBackupType());
         config.setRepository(repository);
         config.setWorkspace(workspace);
         config.setBackupDir(backupDir);
         config.setIncrementalJobPeriod(bConfigBeen.getIncrementalJobPeriod());
         config.setIncrementalJobNumber(bConfigBeen.getIncrementalRepetitionNumber());

         validateRepositoryName(repository);
         validateWorkspaceName(repository, workspace);
         validateOneBackupInstants(repository, workspace);
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

   @Path("/{repositoryName}/{workspaceName}/{userName}/{password}/{incementalPeriod}/startBackup")
   public Response startBackup(@PathParam("repositoryName") String repositoryName,
      @PathParam("workspaceName") String workspaceName, @PathParam("userName") String userName,
      @PathParam("password") String password, @PathParam("incementalPeriod") Long incementalPeriod)
   {
      BackupConfig config = new BackupConfig();
      config.setBackupType(BackupManager.FULL_AND_INCREMENTAL);
      config.setRepository(repositoryName);
      config.setWorkspace(workspaceName);
      config.setBackupDir(backupManager.getBackupDirectory());
      config.setIncrementalJobPeriod(incementalPeriod);

      String result = "ok";

      try
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

         throw new BackupOperationException("Can not get repository \"" + config.getRepository() + "\"", e);
      }
     
      for (WorkspaceEntry workspaceEntry : repository.getWorkspaceEntries())
      {
         BackupConfig wsBackupConfig = new BackupConfig();
         wsBackupConfig.setRepository(config.getRepository());
         wsBackupConfig.setWorkspace(workspaceEntry.getName());
         wsBackupConfig.setBackupType(config.getBackupType());
         wsBackupConfig.setIncrementalJobNumber(config.getIncrementalJobNumber());
         wsBackupConfig.setIncrementalJobPeriod(config.getIncrementalJobPeriod());

         Calendar startTime = Calendar.getInstance();
         File dir =
                  FileNameProducer.generateBackupSetDir(wsBackupConfig.getRepository(), wsBackupConfig.getWorkspace(),
                           config.getBackupDir().getPath(), startTime);
         dir.mkdirs();
         wsBackupConfig.setBackupDir(dir);

         BackupChain bchain =
                  new BackupChainImpl(wsBackupConfig, wsBackupConfig.getBackupDir(), repositoryService, fullBackupType,
                           incrementalBackupType, IdGenerator.generate(), logDirectory, startTime);
        
         wsLogFilePathList.add(bchain.getLogFilePath());
         workspaceBackups.add(bchain);
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

   public void restore(BackupChainLog log, String repositoryName, WorkspaceEntry workspaceEntry)
      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {
      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      // ws should be registered not created
      if (!workspaceAlreadyExist(reposytoryName, workspaceName))
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      throws BackupOperationException, RepositoryException, RepositoryConfigurationException,
      BackupConfigurationException
   {

      List<JobEntryInfo> list = log.getJobEntryInfos();
      BackupConfig config = log.getBackupConfig();

      String reposytoryName = (repositoryName == null ? config.getRepository() : repositoryName);
      String workspaceName = workspaceEntry.getName();

      // ws should be registered not created
      if (!workspaceAlreadyExist(reposytoryName, workspaceName))
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      backupManagerImpl.start();

      File backDir = new File("target/backup/" + repositoryName);
      backDir.mkdirs();

      BackupConfig config = new BackupConfig();
      config.setRepository(repositoryName);
      config.setWorkspace(workspaceName);
      config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
      config.setBackupDir(backDir);

      BackupChain bch = backupManagerImpl.startBackup(config);

      // wait till full backup will stop
      while (bch.getFullBackupState() != BackupChain.FINISHED)
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      backupManagerImpl.start();

      File backDir = new File("target/backup/" + repositoryName);
      backDir.mkdirs();

      BackupConfig config = new BackupConfig();
      config.setRepository(repositoryName);
      config.setWorkspace(workspaceName);
      config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
      config.setBackupDir(backDir);

      BackupChain bch = backupManagerImpl.startBackup(config);

      // wait till full backup will stop
      while (bch.getFullBackupState() != BackupChain.FINISHED)
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      backupManagerImpl.start();

      File backDir = new File("target/backup/" + repositoryName);
      backDir.mkdirs();

      BackupConfig config = new BackupConfig();
      config.setRepository(repositoryName);
      config.setWorkspace(wsEntry.getName());
      config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
      config.setBackupDir(backDir);

      BackupChain bch = backupManagerImpl.startBackup(config);

      // wait till full backup will stop
      while (bch.getFullBackupState() != BackupChain.FINISHED)
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.backup.BackupConfig

      backupManagerImpl.start();

      File backDir = new File("target/backup/" + repositoryName);
      backDir.mkdirs();

      BackupConfig config = new BackupConfig();
      config.setRepository(repositoryName);
      config.setWorkspace(workspaceName);
      config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
      config.setBackupDir(backDir);

      BackupChain bch = backupManagerImpl.startBackup(config);

      // wait till full backup will stop
      while (bch.getFullBackupState() != BackupChain.FINISHED)
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.