Support

UNiTE, Remote CLI, eXtract Wizard

#38562 Unite fails to delete package after restore

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.11
Tool
UNiTE
Tool version
5.0.1

Latest post by SniperSister on Friday, 17 February 2023 06:51 CST

SniperSister

It's me again :)

I have an issue with the removal of package files in a Unite restore process: Unite fails to remove the package:

 

[INFO ] Renaming the existing .htaccess file
[INFO ] Writing a stealth .htaccess file
[INFO ] Extracting backup archive
925891408 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 31 secs 10.0 MiB[WARNING] Could not delete package site-redacted.com-20230216-161831cet-j6yQoCp3v4lX-kOs.jpa. You'll have to do it manually.
[INFO ] Checking ANGIE support
[INFO ] Setting up the restoration script for unattended restoration
[INFO ] Locking the web restoration script with a random password
[INFO ] Detected site restoration platform: Joomla
[INFO ] Resetting the restoration script
[INFO ] Detecting the backed up site's CMS version
[INFO ] Detecting the backed up site's configuration
[INFO ] Starting restoration of database contents
[INFO ] Restoring site database

Not sure if it matters: I was running Unite in verbose mode.

The package file was fetched from a remote, so it was created in the exact same process where it should have been deleted. Deleting the file with the same unix user that executed the script worked perfectly fine. Maybe a bug in the deletion logic?

nicholas
Akeeba Staff
Manager

The files are deleted in an array_reduce call. However, there was a small problem. Since the initial carry was false, PHP's boolean short-circuit evaluation meant that the unlink() was never called. See \Akeeba\UNiTE\Engine\Job\Extract::execute towards line 113.

I'll fix that for the next UNiTE release.

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!

SniperSister

Perfect, thanks!

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!