Examples of RepositoryBackupChainLog


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

         try
         {
            if (!isCurrentRepositoryBackup(cf))
            {
               logs.add(new RepositoryBackupChainLog(cf));
            }
         }
         catch (BackupOperationException e)
         {
            log.warn("Log file " + PrivilegedFileHelper.getAbsolutePath(cf) + " is bussy or corrupted. Skipped. " + e,
View Full Code Here

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

    * {@inheritDoc}
    */
   public void restoreExistingRepository(String repositoryBackupIdentifier, RepositoryEntry repositoryEntry,
      boolean asynchronous) throws BackupOperationException, BackupConfigurationException
   {
      RepositoryBackupChainLog backupChainLog = null;

      for (RepositoryBackupChainLog chainLog : getRepositoryBackupsLogs())
      {
         if (chainLog.getBackupId().equals(repositoryBackupIdentifier))
         {
View Full Code Here

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

    * {@inheritDoc}
    */
   public void restoreExistingRepository(String repositoryBackupIdentifier, boolean asynchronous)
      throws BackupOperationException, BackupConfigurationException
   {
      RepositoryBackupChainLog backupChainLog = null;

      for (RepositoryBackupChainLog chainLog : getRepositoryBackupsLogs())
      {
         if (chainLog.getBackupId().equals(repositoryBackupIdentifier))
         {
            backupChainLog = chainLog;
            break;
         }
      }

      if (backupChainLog == null)
      {
         throw new BackupConfigurationException("Can not found backup of repository with id \""
            + repositoryBackupIdentifier + "\"");
      }

      this.restoreExistingRepository(backupChainLog, backupChainLog.getOriginalRepositoryEntry(), asynchronous);

   }
View Full Code Here

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

    * {@inheritDoc}
    */
   public void restoreRepository(String repositoryBackupIdentifier, boolean asynchronous)
      throws BackupOperationException, BackupConfigurationException
   {
      RepositoryBackupChainLog backupChainLog = null;

      for (RepositoryBackupChainLog chainLog : getRepositoryBackupsLogs())
      {
         if (chainLog.getBackupId().equals(repositoryBackupIdentifier))
         {
            backupChainLog = chainLog;
            break;
         }
      }

      if (backupChainLog == null)
      {
         throw new BackupConfigurationException("Can not found backup of repository with id \""
            + repositoryBackupIdentifier + "\"");
      }

      try
      {
         this.restore(backupChainLog, backupChainLog.getOriginalRepositoryEntry(), asynchronous);
      }
      catch (RepositoryException e)
      {
         throw new RepositoryRestoreExeption("Repository \"" + backupChainLog.getOriginalRepositoryEntry().getName()
            + "\" was not restored", e);
      }
      catch (RepositoryConfigurationException e)
      {
         throw new RepositoryRestoreExeption("Repository \"" + backupChainLog.getOriginalRepositoryEntry().getName()
            + "\" was not restored", e);
      }
   }
View Full Code Here

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

      {
         throw new BackupConfigurationException(
            "Backup set directory should contains only one repository backup log : " + repositoryBackupSetDir.getPath());
      }

      RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(cfs[0]);

      this.restoreExistingRepository(backupChainLog, backupChainLog.getOriginalRepositoryEntry(), asynchronous);
   }
View Full Code Here

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

      {
         throw new BackupConfigurationException(
            "Backup set directory should contains only one repository backup log : " + repositoryBackupSetDir.getPath());
      }

      RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(cfs[0]);

      try
      {
         this.restore(backupChainLog, backupChainLog.getOriginalRepositoryEntry(), asynchronous);
      }
      catch (RepositoryException e)
      {
         throw new RepositoryRestoreExeption("Repository \"" + backupChainLog.getOriginalRepositoryEntry().getName()
            + "\" was not restored", e);
      }
      catch (RepositoryConfigurationException e)
      {
         throw new RepositoryRestoreExeption("Repository \"" + backupChainLog.getOriginalRepositoryEntry().getName()
            + "\" was not restored", e);
      }
   }
View Full Code Here

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

        
         wsLogFilePathList.add(bchain.getLogFilePath());
         workspaceBackups.add(bchain);
      }
     
      this.repositoryChainLog = new RepositoryBackupChainLog(logDirectory,
                                                             this.config,
                                                             fullBackupType,
                                                             incrementalBackupType,
                                                             repository.getConfiguration().getSystemWorkspaceName(),
                                                             wsLogFilePathList,
View Full Code Here

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

            throw new RepositoryCreationException(e.getMessage(), e);
         }
      }

      // restore repository from backup
      RepositoryBackupChainLog backupChain = null;
      for (RepositoryBackupChainLog chainLog : backupManager.getRepositoryBackupsLogs())
      {
         if (chainLog.getBackupId().equals(backupId))
         {
            backupChain = chainLog;
            break;
         }
      }

      if (backupChain == null)
      {
         throw new RepositoryCreationException("BackupChain by id " + backupId + " does not exists.");
      }

      File backLog = new File(backupChain.getLogFilePath());
      if (backLog != null && PrivilegedFileHelper.exists(backLog))
      {
         try
         {
            backupManager.restore(backupChain, rEntry, false, true);
View Full Code Here

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

         String repository = null;

         try
         {

            RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(backuplog);
            repository = backupChainLog.getBackupConfig().getRepository();

            validateOneRepositoryRestoreInstants(repository);

            if (removeExisting)
            {
View Full Code Here

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

         if (isRepositoryExist(rEntry.getName()))
         {
            throw new RepositoryRestoreExeption("Repository " + rEntry.getName() + " already exist!");
         }

         RepositoryBackupChainLog backupChainLog = new RepositoryBackupChainLog(backupLog);

         backupManager.restore(backupChainLog, rEntry, true);

         // Sleeping. Restore should be initialized by job thread
         Thread.sleep(100);
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.