Hello.
I want to describe the process of fully automatic creation of backup copies of sites on the CMS Joomla using the Akeeba backup component, and its free version.
I know that Jumla on Habré is not particularly favored, but I think there will still be habrovchane who create sites with its help.
As an example, I will use
Joomla 2.5.16First of all, we need to install the Akeeba Backup component. You can download it from here:
www.akeebabackup.com/downloads/akeeba-backup.htmlWhat is a backup made with Akeeba backupAt the output we will get a file with the jpa extension, which includes all the files on our site, as well as a database dump. This backup is very easy to roll onto any server, following step-by-step instructions. How to do this, I will write below.
My website is hosted on timeweb, but I think that most hosting companies have in their control panel a way to create tasks using the crontab scheduler. If your site is on your own server, it's even easier.
')
First of all, we need to activate the ability to make backup not only from the Joomla panel. To do this, go to
Components -> Akeeba backup -> Component Parameters . You need to set the switch to
YES in the
Enable front-end and remote backup property. Specify the secret word that will be used to generate the link, optionally, you can enable e-mail notifications about backup execution.

Now you need to write a small shell script that will be launched by the Crontab scheduler.
It looks like this:
This script provides backup of our site.
After that, it is necessary to indicate the backup frequency to the Crontab scheduler. For timeweb hosting this is done like this: Crontab
Panel . Next, select
Add New Task.We write the name of our task, the file type:
SH script , specify the path to the file on our server (of course, the file with the script must be uploaded to the server in advance), well, select the required backup frequency.

If you have full access to the server where the site is located, then you need to add a line to the
crontab config , which by default is located in / etc / named crontab
Everything, now our backups will be made automatically according to the schedule and will be added to the directory specified in the settings of the Akeeba Backup component. Default:
administrator / components / com_akeeba / backup /In the future, I plan to expand the bash script so that it deletes outdated backups and also transfers these files to the dropbox. If you have any thoughts on how to do this, please share in the comments.
How to restore a site from backupIn order to restore the site or transfer it to another server, you need to download a set of files called Akeeba Kickstart:
www.akeebabackup.com/downloads/akeeba-kickstart.htmlThis set includes the following files:
- jquery.min.js - jquery library
- json2.min.js - Json Library
- kickstart.php - PHP script that performs the recovery
- ru-RU.kickstart.ini - localization language
It is necessary to place these files on the server and throw in the same file with backup, which has the extension jpa.
Then just go to: http: // <your site> /kickstart.php and follow the instructions.
If you restore the site on the same server where it was, then part of the settings will be pulled up automatically, otherwise you will need to specify new settings for the correct formation of the config: the path to the database, the database name, the database user name, and so on.
After following all the instructions, the system will restore the site. And no dances with a tambourine with perezalivkoy hands of all files (especially disgusting to do it via FTP), as well as manual editing of the configuration file configuration.php in the root of the site.
UPD 12/17/2013: Expanded script, now it removes outdated backups.
UPD 05/16/2014: I wanted to get bogged down with sending a backup to the dropbox, but it comes out painfully, it is much easier to use cloud storage with WebDAV support, I used the Yandex disk. Here is the script:
Well and we create by analogy a task in cron under script launch