Support

Akeeba Solo

#40583 Feature request - Allow "replace in db" for all restoration options

Posted in ‘Akeeba Solo (standalone)’
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
n/a
Akeeba Solo version
n/a

Latest post by nicholas on Wednesday, 08 May 2024 01:01 CDT

carcam

Hi,

I use Akeeba Solo and UNiTE to backup and restore PrestaShop sites with quite success so far and it helps me a lot in my workflow. Thanks!!

In any case, for PrestaShop (as in WP), you need to replace the url of the site in DB, so I thought it will be really helpful to be able to replace the URL directly using the "replace in DB" feature that already exists in WordPress. Do you think you could add it?

I think it will be also really helpful in Joomla! and other systems, for instance to replace URL occurrences in the DB without the need to use other tools.

Thanks!!

nicholas
Akeeba Staff
Manager

The only reason this exists in the WordPress restoration is that WordPress won't work if you don't do that. This does not mean it's a good thing. We know the ways it can fail, and it's mostly to do with how badly hosts handle scripts going through the entire database in rapid succession.

I am against providing this feature in the general use case.

At some point I may have enough time to actually create the CLI and standalone script versions of Akeeba Replace. Right now, it's only a library we use in the restoration script and a WP plugin. You can totally come up with the CLI yourself (I would use Silly and Box for that) if you want. Contributions are welcome :)

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!

carcam

Hi Nicholas,

thank you very much for your answer!!

Those links are really useful to understand better what is under the hook. I had not checked the code and I thought you were doing the replacement on the SQL files before the installation (In RegExp we trust!).

I agree with you about doing such replacements in the DB. In any case, I do see a great value in such a plugin (specially for WordPress).

Is there any mechanism inside Akeeba UNiTE to “chain” my custom-made scripts, or should I just create my own bash stuff?

Thanks!!

nicholas
Akeeba Staff
Manager

There is the handlers section which allows you to run any PHP file which returns a callable class, see https://www.akeeba.com/documentation/unite/handler-files.html That said, using PHP to run a bash script is not something I'd recommend.

Depending on the use case, I would either call UNiTE from inside the bash script, or as part of an Ansible playbook. UNiTE sets a non-zero exit code when there are error conditions, making it easy to be a part of a larger automation.

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!