Support

UNiTE, Remote CLI, eXtract Wizard

#39433 when extracting archive from remote

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.1.1
Tool
UNiTE
Tool version
5.0.2

Latest post by nicholas on Thursday, 07 September 2023 04:02 CDT

schmithu

Hi!

I try to restore a backup from a remote site into the local xampp (for now, later also another remote site will be needed)

After patching the unit.phar (https://www.akeeba.com/support/desktop-utilities/39432-engine-job-validator-determines-wrong-http-method.html) I managed to create a config that successfully backups the remote site, but it fails when trying to extract:

Console Output:

URL: https://MYDOMAIN.DE/api/index.php/v2/akeebabackup?_akeebaAuth=AKEEBAAUTHKEY&backup_id=49&view=Api&method=getBackupInfo&option=com_akeebabackup&format=raw
  0% [>---------------------------] < 1 sec/< 1 sec
100% [============================] 15 secs/15 secsData: Array
(
    [backup_id] => 49
)

URL: https://MYDOMAIN.DE/api/index.php/v2/akeebabackup?_akeebaAuth=AKEEBAAUTHKEY&backup_id=49&view=Api&method=delete&option=com_akeebabackup&format=raw
    0 [>---------------------------] < 1 sec 4.0 MiB[INFO   ] Renaming the existing .htaccess file
[INFO   ] Writing a stealth .htaccess file
[INFO   ] Extracting backup archive
[ERROR  ] fseek(): Argument #1 ($stream) must be of type resource, bool given

 [ERROR] phar://SOME-LOCAL-FOLDER/unite-fixed.phar/Engine/restore.php:1323

Logfile -vvv:

2023-09-06 12:32:53 DEBUG Finished backing up the remote site
2023-09-06 12:33:09 DEBUG Successfully renamed BACKUP-ARCHIVE-NAME-20230906-123222cest-UW_2rs51IIZ7aFfe.jpa to BACKUP-ARCHIVE-NAME-20230906-123222cest-UW_2rs51IIZ7aFfe.jpa
2023-09-06 12:33:09 DEBUG Successfully downloaded BACKUP-ARCHIVE-NAME-20230906-123222cest-UW_2rs51IIZ7aFfe.jpa
2023-09-06 12:33:10 INFO Renaming the existing .htaccess file
2023-09-06 12:33:10 INFO Writing a stealth .htaccess file
2023-09-06 12:33:10 DEBUG Looking for PHP handlers in the current .htaccess
2023-09-06 12:33:10 DEBUG No PHP handlers found in the current .htaccess
2023-09-06 12:33:10 INFO Extracting backup archive
2023-09-06 12:33:10 ERROR fseek(): Argument #1 ($stream) must be of type resource, bool given
2023-09-06 12:33:10 ERROR phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/restore.php:1323
2023-09-06 12:33:10 ERROR #1 phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/restore.php(3901): AKAbstractUnarchiver->nextFile()
2023-09-06 12:33:10 ERROR #2 phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/restore.php(1047): AKUnarchiverJPA->readArchiveHeader()
2023-09-06 12:33:10 ERROR #3 phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/restore.php(558): AKAbstractUnarchiver->_prepare()
2023-09-06 12:33:10 ERROR #4 phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/Job/Extract.php(74): AKAbstractPart->tick()
2023-09-06 12:33:10 ERROR #5 phar://MY-LOCAL-PATH/unite-fixed.phar/Engine/Core/AbstractControllerStack.php(131): Akeeba\UNiTE\Engine\Job\Extract->execute()
2023-09-06 12:33:10 ERROR #6 phar://MY-LOCAL-PATH/unite-fixed.phar/Command/Restore.php(115): Akeeba\UNiTE\Engine\Core\AbstractControllerStack->execute()
2023-09-06 12:33:10 ERROR #7 phar://MY-LOCAL-PATH/unite-fixed.phar/vendor/joomla/console/src/Command/AbstractCommand.php(235): Akeeba\UNiTE\Command\Restore->doExecute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2023-09-06 12:33:10 ERROR #8 phar://MY-LOCAL-PATH/unite-fixed.phar/vendor/joomla/console/src/Application.php(1181): Joomla\Console\Command\AbstractCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2023-09-06 12:33:10 ERROR #9 phar://MY-LOCAL-PATH/unite-fixed.phar/Application.php(152): Joomla\Console\Application->runCommand(Object(Akeeba\UNiTE\Command\Restore), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2023-09-06 12:33:10 ERROR #10 phar://MY-LOCAL-PATH/unite-fixed.phar/vendor/joomla/console/src/Application.php(403): Akeeba\UNiTE\Application->runCommand(Object(Akeeba\UNiTE\Command\Restore), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2023-09-06 12:33:10 ERROR #11 phar://MY-LOCAL-PATH/unite-fixed.phar/vendor/joomla/console/src/Application.php(448): Joomla\Console\Application->doExecute()
2023-09-06 12:33:10 ERROR #12 phar://MY-LOCAL-PATH/unite-fixed.phar/Application.php(94): Joomla\Console\Application->execute()
2023-09-06 12:33:10 ERROR #13 phar://MY-LOCAL-PATH/unite-fixed.phar/unite.php(52): Akeeba\UNiTE\Application->execute()
2023-09-06 12:33:10 ERROR #14 C:\Users\david\odrive\OneDrive\Dokumente\Websites\max7.de\com_tanzschule\build-tools\unite\unite-fixed.phar(19): require_once('phar://C:/Users...')
2023-09-06 12:33:10 ERROR #15 {main}

My Config yaml (personal info and secret removed/replaced):

remote:
host: 'https://MYDOMAIN.de'
secret: MYSECRET
component: com_akeebabackup
endpoint: api/index.php/v2/akeebabackup
legacy: false
view: api
profile: 3 # some comment here
downloadmode: curl
dlurl: 'ftp://FTPUSER:FTPPASS@FTPHOST/'
delete: true
siteInfo:
#package: 'LOCAL-WORKING-DIR\MYBACKUPFILENAME-jjoYfFvBuNnqjoAg.jpa'
packageFrom: remote
deletePackage: true
localLog: uniteLog.txt
emailSysop: 0
absolutepath: C:/xampp-8.1.1-2/htdocs/LOCALDOMAIN-NAME
name: '...'
email: [email protected]
livesite: ''
cookiedomain: LOCALDOMAIN-NAME
cookiepath: '/'
force_ssl: true
removephpini: 1
removehtpasswd: 1
replacehtaccess: 1
replacewebconfig: 1
databaseInfo:
site:
dbdriver: mysqli
dbhost: 127.0.0.1
dbuser: '...'
dbpass: '...'
dbname: '...'
dbprefix: 'j_'
existing: drop
foreignkey: true # ignore any foreign key constraint

If I use the package: setting and point it to the downloaded file, the extraction runs as expected and the site gets restored correctly.

Any ideas?

 

Best regards

David

 

nicholas
Akeeba Staff
Manager

Please try using the latest development version. The code has already been thoroughly refactored. The version you are using has not much to do with the code base we're working on right now.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!