Support

Akeeba Backup for Joomla!

#30923 Restoring sites behind a Load Balancer and no sticky sessions

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
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

Joomla! version
n/a
PHP version
n/a
Akeeba Backup version
n/a

Latest post by extly on Monday, 25 February 2019 10:36 CST

extly
Hi,

We are restoring backups on web servers behind a load balancer. We restore with kickstart or with unite-restore. Both methods seem to regenerate the configuration secret (I guess that it's done in this way to hide the original secret).

So, we are assigning a new secret and manually synchronizing the secret between servers to keep the load balancer working fine with sticky sessions off.

Is there a better way to manage the secret of each server configuration?

Regards,
Anibal

nicholas
Akeeba Staff
Manager
I'll make an assumption that you have a cluster of application servers and a single database server (or a DB cluster with one master and several slaves).

The best way to handle this is take one server off the cluster, perform an unattended restoration using UNiTE and then rsync to the rest of the servers. The only problem with that is that any access to the rest of the servers in the cluster may result in an inconsistent state in the database.

Ideally you should have a way to temporarily serve a fail page with an HTTP 307 during maintenance, preferably served from a CDN or a web server which is not part of the cluster. This would allow you to do the unattended restoration to one server and rsync to the rest of the servers. Finally, you'd put the cluster back on-line (stop serving the maintenance page).

The implementation details for this process depend on how you've set up your load balancer. I can't help with that bit. I hope that by giving you a general idea I am helping you somewhat :)

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!

extly
Hi,

Yes, that's exactly the case.

We have been evaluating the organization of a master node, to restore there and rsync the changes to the rest of the nodes. We'll process in the implementation.

Thanks,
Anibal

nicholas
Akeeba Staff
Manager
You're welcome! Out of curiosity, please let me know if you found it easier with unattended restoration (UNiTE) or manual restoration.

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!

extly

Unite is fantastic. If I can, I always try to restore first with unite.

The only problem is backups with passwords. So, if the site is not restored in one step, I have to manually remove the password.php and continue with the rest of the process.

This is my template for Unite https://github.com/anibalsanchez/lando-boilerplates-for-joomla-wordpress-and-prestashop/blob/master/joomla/config/joomla-unite_tpl.xml, that it is executed in the context of a Docker/Lando recipe initialization.

In practice, most of the time, I'm executing "lando unite-restore" or "lando kick-restore":

https://github.com/anibalsanchez/lando-boilerplates-for-joomla-wordpress-and-prestashop/blob/master/joomla/.lando.yml#L100

Regards,

nicholas
Akeeba Staff
Manager
I don't understand the comment about backups with passwords. UNiTE runs under CLI and is not subject to the ANGIE password. I just tried taking a backup of a site with ANGIE password set up and restore it with UNiTE. The restoration was complete in about 2' without any manual intervention. The installation directory was of course removed at the end of the restoration as well.

Are we talking about a different thing?

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!

extly

Yes, it is the same case.... As far as I can tell Unite (unite.phar, 4.0.2 (2018-12-06) respects Angie password. After the command ends, the backup is only uncompressed.

nicholas
Akeeba Staff
Manager
No, it does not care about the password protection. The password protection is implemented at the Controller level. UNiTE only uses the Models of the ANGIE application. They do not enforce password protection. I actually tested it before I replied. What is the exact error message returned by UNiTE? Can you maybe post a UNiTE log file?

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!

extly

I haven't found the issue recently. It could have been resolved by itself with a system updated, and I didn't notice when ... ;-)

If I find the issue again on Unite Cli, I'll open a new ticket.

Thanks,
Anibal

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!