Due to unforeseen technical failures, the loss of important information can occur, in particular, the performance of the whole site is at risk. To avoid this, it is recommended to periodically make a backup of the site, which will allow you to “roll back” to its working version if something happens.
Internet marketing outside the Moscow Ring Road:
the best online promotion companies in Russia 2020
What is a site backup and what is it for?
Backup is a backup copy of the site’s file system and / or its database. In other words, the site is saved in its current form with all its settings, design, content, etc. The backup itself is stored on hosting servers, in third-party cloud storage, or downloaded to a local disk. With this approach to data protection, it becomes possible to restore the site in whole or in part.
Here are the main reasons why critical site crashes can occur:
- Unreliable hosting provider. The hosting (server) stores site files, as well as its database. If a hosting failure occurs, the loss of an entire resource may occur if no backups have been made in advance. As a rule, trusted hosting providers make backups of client sites themselves, and also duplicate the entire file system between several servers. However, unverified service providers may not have these options.
- Hacking the site. For various reasons, the site can be hacked, injected with malicious code, and also disrupt its operation. Modern CMSs improve the degree of protection of sites every year, but third-party plugins, templates, and so on can become the weak link.
- Errors of site administrators. When filling, changing the design, introducing new functions on the site, errors may occur on the part of the developer. Therefore, it is better to create a backup before starting work, and in case of a failure, it will be easier to restore the resource than to look for the mistake.
In addition, a site backup can be useful in case of moving a site from one hosting provider to another. Or when transferring it from a local server to hosting.
The more actively the resource develops, the more often it should be backed up. However, it is recommended to create and store regular chains of backups. This should be done because the problem on the site is sometimes not immediately detected, in other words, the last backup may contain an error and, accordingly, restoration will not lead to its correction.
How to make a website backup?
Let’s take a look at two main ways of creating site backups: using the hosting provider’s tools and by manually copying data. As mentioned above, the more actively the site develops, the more often backups should be made. For large resources, it is recommended to adhere to the following backup storage scheme:
- Creation of daily copies, while they must be kept for the last month.
- Selecting weekly copies from previous (except for the last) months and keeping them during the last quarter.
- Likewise, select monthly copies (except for the last quarter) and store them throughout the year.
Of course, sites can “weigh” quite a lot, but if this is a serious commercial project, then it is recommended to think about the allocation of appropriate disk space. As a compromise, if the site changes only that part of the content that is stored in the database, then only backup it.
Creating a backup via the hosting panel
All popular hosting providers have a service – automatic creation of site backups. It can be free or paid. Often, the free version of the service is provided in a limited way, such as limiting the size of a backup. At the same time, it is also worth considering the storage time of backups. The essence of the service is that a backup copy of the site is automatically created at a certain time interval.
Hosting panels differ from each other, in order to find the right tool, you should look for sections similar to: “Backups”, “Backup”, etc. On the tool tab, there is usually a button “Create backup”, clicking on which will create a backup. In this case, it is imperative to understand whether a copy of the entire site, its files or database is being created.
An example of the “Backups” section in the hosting panel
The example shows that a backup of files is being created, and the service itself costs 5 rubles / day.
If you use, for example, hosting beget.com, then it is still easier there, unloading and restoring from a backup copy are in one place.
In most cases, the backups created by the hosting provider’s tools can be downloaded to your computer.
Creating a backup using an FTP client and phpMyadmin
You can create and download a copy of the site manually using an FTP client and phpMyAdmin.
PhpMyAdmin is a (if simplified) front-end application that allows you to administer site databases through a browser. In the context of this article, we are interested in the possibility of creating backups of databases.
You can get into phpMyAdmin through a link in the hosting provider’s panel through the Databases section. The left column will display all your databases if there are multiple sites.
The data in the database is stored in the form of tables, you can export both the entire database of a particular site, and its individual tables.
Example of export to PhpMyAdmin
By default, the “Quick Method” export is selected, which backs up the entire database. To select individual tables, as well as to open access to advanced export settings, select the “Normal” method. In the vast majority, especially for inexperienced users, the “Quick” option is suitable.
Choosing the export method and other parameters
We select it, and press the button “Forward”. A backup file is formed in SQL format, after which we save it to the computer.
Thus, only the content part of the site is preserved: articles, links within them, site structure, and the like. But its files are not saved: design (templates and styles), content files (images, videos, etc.), etc. In order to back up your files, you need an FTP client with which you can access the site’s file system.
The client can be in the form of a program or a web interface of a hosting provider. The program is most often used by FileZilla, a free FTP client.
To access the site’s file system, you will need: server IP address, username and password. They are provided by the hosting provider.
We go through the FileZilla program
We fill in the appropriate fields and connect to the server. If there are several sites on the server, then most often, their directories are designated in accordance with the domain name. We go to the directory of interest, which contains all the files of the site engine. Our task is to copy them to the computer:
- The left window shows local files and folders, open the folder created for the backup.
- In the right window – files and directories of the site. Select them and copy them to an open folder on your computer by dragging and dropping them.
- We are waiting for the end of the procedure.
Copying a large site can take a decent amount of time, so to speed up the process, you can allow the program to process up to 10 files.
Go to settings
Set to 10
How to make a backup of a site on WordPress?
If the site runs under the control of the WordPress system, then making backups is easier through special plugins. One of the most popular is Duplicator. The essence of its work is simple: an archive is created with a full backup of the site, the archive itself is available in the plugin folder, it can be downloaded and easily transferred to another hosting, for example.
In the free version of the plugin, you can create packages manually. The PRO version, on the other hand, allows you to back up the site on a schedule, and packages are exported to third-party cloud storage, for example, Dropbox, Google Disk, etc.
Backup to 1C-Bitrix
The backup tool on this CMS is available out of the box. Located at: “Settings” – “Tools” – “Backup”. The backup itself can be stored both on 1C-Bitrix servers and in the site folder. Advanced settings allow you to choose what should be backed up (public part of the site, database or engine core).
There is also a script to periodically run the copy tool, which will allow you to create backups automatically on a schedule.
How do I restore a site?
If any failure occurs and you need to restore the site, then depending on the way in which the backup was made, the recovery method will also differ.
Through the hosting panel
Everything is simple here, go to the “Backups” section (or a similar name), select the “Restore” subsection, all backups by date will be presented here. Accordingly, we select the required one and restore it. The recovery itself may take some time – it usually depends on the size of the site.
Via FTP client and phpMyadmin
If we talk about site files, then to restore from a backup copy, it is enough to replace those on the server with them. This is also done in the FTP client, as when copying, only now from the local computer window to the server window. You can also pre-delete files on the server and copy them from the backup to a clean directory.
As for phpMyadmin, here we need to import a backup from the SQL file into the site database. At the same time, we save the default import settings, indicate the location of the file and press the “Next” button.
Via Duplicator in WordPress
To restore, you will need an FTP client, using it you need to delete everything from the site folder. It is recommended to download its contents to a local disk beforehand. Next, the archive with the backup and the file from the plug-in “installer.php” are uploaded, which should be launched in the browser, specifying its address (stie.com/installer.php). Then we follow the instructions and deploy the working version of the site.
So, we looked at the main ways to back up your site, as well as ways to restore it. Another tip, in addition to scheduled backups, be sure to create unscheduled copies, for example, when a CMS is being updated or a new plugin is being installed.