Support

Akeeba Backup for Joomla!

#41136 Backup to /backup directory

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
5.1
PHP version
8.3
Akeeba Backup version
9.9.6

Latest post by nicholas on Monday, 23 September 2024 07:11 CDT

psrch

Is it possible for Akeeba backup to save the backups to a directory outside the cPanel account's directory? I'm currently saving backups using cPanel's backup facility to Backblaze, but I would like to set up a backup schedule with weekly full / daily incremental backups in the /backup directory. It doesn't seem like Akeeba Backup will accept an output directory specification of /backup.

nicholas
Akeeba Staff
Manager

TL;DR: I believe you should just use [ROOTPARENT]/backup instead of /backup. Read on for the slightly gory details.

Whether that is possible depends on your PHP settings. As long as there is no open_basedir restriction, Akeeba Backup can store backups in any directory PHP can write to, regardless of its location. I always use a backup output directory which is above the site root, i.e. next to the public_html directory. This is, as a matter of fact, what we explicitly recommend in our documentation.

I do have to warn you, though, that /backup DOES NOT look like a valid directory specification. This denotes a directory called backup which is directly under the root of the filesystem, next to the system folders /etc/usr, /var, /opt etc. If you really had a directory like that it would mean that you are managing your own server and have more than enough knowledge not to have to ask me about ownership, permissions, and directory naming. If you really had a directory there and it was writeable by PHP, it would work just fine. I have actually done that on a dev server.

I believe that what you did is create a folder named backup next to your public_html folder. This will probably have an absolute path similar to /home/myuser/backup. Since that is quite problematic to find out if you don't know anything about how that works, I have implemented two things to help you since nearly 15 years ago.

One way is using the Browse button next to the backup output directory. Start with [DEFAULT_OUTPUT] in it and go up. You will see the backup directory. Click on it, then click on Use, then Close. It will probably come up with something like [ROOTPARENT]/backup.

Which brings us to the second tool I have given you: special variables. The [ROOTPARENT] variable is automatically expanded to the absolute filesystem path of the directory above your site's root i.e. its parent directory. Why? Because, as I said above, this is what we explicitly recommend in our documentation :) If you create a directory named backup above and next to your site's root, its absolute path will be [ROOTPARENT]/backup. You don't even have to understand why, you just need to ape what the documentation says. That's the best I can do to strike a balance between simple and powerful.

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!