I configured the names of the backup files to be "site-[HOST]-[DATE]-[VERSION]-[RANDOM] "
As a result when I click the button to do a backup I get something like
On my localhost server (named "sites") I get "site-sites-20240102-9.8.3-9UlCscuM3WBDLEjs.jpa ", which is correct.
On my online server's website with a domain name (e.g. "example.com") I get "site-www.example.com-20240102-9.8.3-9UlCscuM3WBDLEjs.jpa " which is correct.
The problem is that when the backup on the online server was initiated by a cron job, the resulting file appears with a wrong name like "site-sites-20240102-9.8.3-9UlCscuM3WBDLEjs.jpa " instead of the expected name "site-www.example.com-20240102-9.8.3-9UlCscuM3WBDLEjs.jpa "
Where does Akeeba Backup find the name "sites" on my online server's website? And why does the wrong naming only happens when a backup is initiated with a cron job?
This happens only on Joomla 5 and Joomla 4 websites. On Joomla 3 websites, online backups initiated by cron jobs produce files with the expected correct names.
Below is the cPanel cron command I have for a Joomla 5 Akeeba Backup:
/usr/local/bin/php /home/<accountID>/public_html/cli/joomla.php akeeba:backup:take --profile=2
Below is the cPanel cron command I have for a Joomla 3 Akeeba Backup
/usr/local/bin/php /home/<accountID>/public_html/cli/akeeba-backup.php --profile=2