public function restoreBackup(ContainerConfigurationInterface $containerNode, \SplFileInfo $archive)
    {

        // if we don't want create backups we can't restore them, so do nothing
        if ($this->getExtractorNode()->isCreateBackups() === false || $this->getExtractorNode()->isRestoreBackups() === false) {
            return;
        }

        // create tmp & webapp folder name based on the archive's basename
        $webappFolderName = $this->getWebappsDir($containerNode, basename($archive->getFilename(), $this->getExtensionSuffix()));
        $tmpFolderName = $this->getTmpDir($containerNode, md5(basename($archive->getFilename(), $this->getExtensionSuffix())));

        // copy backup to webapp directory
        $this->copyDir($tmpFolderName, $webappFolderName);
    }
public function restoreBackup(ContainerConfigurationInterface $containerNode, \SplFileInfo $archive)
    {

        // if we don't want create backups we can't restore them, so do nothing
        if ($this->getExtractorNode()->isCreateBackups() === false || $this->getExtractorNode()->isRestoreBackups() === false) {
            return;
        }

        // create tmp & webapp folder name based on the archive's basename
        $webappFolderName = $this->getWebappsDir($containerNode, basename($archive->getFilename(), $this->getExtensionSuffix()));
        $tmpFolderName = $this->getTmpDir($containerNode, md5(basename($archive->getFilename(), $this->getExtensionSuffix())));

        // copy backup to webapp directory
        $this->copyDir($tmpFolderName, $webappFolderName);
    }
public function restoreBackup ( ContainerConfigurationInterface $ containerNode , \ SplFileInfo $ archive ) { // if we don't want create backups we can't restore them, so do nothing if ( $ this -> getExtractorNode ( ) -> isCreateBackups ( ) === false || $ this -> getExtractorNode ( ) -> isRestoreBackups ( ) === false ) { return ; } // create tmp & webapp folder name based on the archive's basename $ webappFolderName = $ this -> getWebappsDir ( $ containerNode , basename ( $ archive -> getFilename ( ) , $ this -> getExtensionSuffix ( ) ) ) ; $ tmpFolderName = $ this -> getTmpDir ( $ containerNode , md5 ( basename ( $ archive -> getFilename ( ) , $ this -> getExtensionSuffix ( ) ) ) ) ; // copy backup to webapp directory $ this -> copyDir ( $ tmpFolderName , $ webappFolderName ) ; }
Restores the backup files from the backup directory.

@param \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface $containerNode The container the archive belongs to
@param \SplFileInfo                                                                     $archive       To restore the files for

@return void
Restores the backup files from the backup directory .