Be it a virus, system hacking, unsuccessful system update, CMS failure, or loss of access to your host computer – all lead to serious troubles. If any of the mentioned above happens, your website will stop to operate correctly, that is to say, the least. You can lose some important data with all the unpleasant consequences as the worst-case scenario.
Should you deal with any related issues, Drupal backup is the key to restoring the platform’s proper operation. With the help of the software, you will be able to back up the system manually or automatically using the free module. Backup copies of your database and other files will be quickly and effectively saved in the FTP server, Dropbox or HPCloud. They will be easy to restore, no matter the situation. In case you feel like it is too challenging for you to deal with the task, you can refer to IDAP. The specialists there are well-aware of how to deal with every situation and solve any issue.
Turn your website into an app
Do you already have a dedicated business website doing its customer-attracting job online? Do you know what will expand your reach even further? A mobile app. And you can kill two birds with one stone by simply turning an existing website into an application. Read more on the topic.
What’s Backup And When Do You Need It?
In order to keep all the data safe, you should transfer it to secure storage. Many different storages are allowing you to do that. Think about your PC hard drive, remote server of the provider, or a filesharing cloud server. Should it happen that the main site’s files are damaged, you can restore the current settings at any time. It is advised to keep your copies in various secure storage locations so that all the risks are diversified. You can also protect your website by transferring it to a backup hosting.
The situations when you may require a Drupal backup differ:
- Server/computer breakdown. If you have one system copy, there is always a great chance of losing it;
- Software failure. Some vital file data may be deleted or damaged, and it is almost impossible or actually impossible to restore it;
- Illegal entry. There is always a chance that some hackers will intentionally damage your data or simply steal it to use for your own benefit. At times like this, even if you have a quality antivirus and firewall protection implemented – it is most likely not to be of any use.
- User error. Sometimes the lack of experience or being in a hurry may result in unintentional file damaging. Backup is the simplest way to restore the file.
Some people usually rely on sheer luck and hope that everything will be okay, but some situations are nearly impossible to predict. If there is a slight chance of losing crucial information, it is essential to do everything to rule such a possibility out. There are different backup options, but all of them are entitled to the same task – website and data protection in case of any mishap.
How Often To Make Backups
Very often, users save a few backup copies made every now and then over an extended period. The fact is that at times issues with the portal appear after some time, and that is when yesterday’s backup copy will do you no good. After a virus affects the system, it may remain undetected, slowly degrading the system. It is an unpleasant reality, but most viruses are not that easy to eliminate. So, it is a lot easier to delete the whole infected system and use its backup copy to create a stable website version.
The backup frequency and the number of backup copies are directly connected to the frequency of website updates and modification. In case that database is huge, and some files are regularly updated, you may require to use the Backup drupal site often. To make the website absolutely safe and secure, you should do the following:
- Daily backup copy creation
- Daily backup copies for the past month
- Weekly copies for the past quarter
- Monthly copies for the past year
There are also unscheduled backup copies to be made before each CMS and plugin updates, code and database edits. How many copies should you save? All that has been made over the year. Usually, it is enough to make 1-2 backups a month, so in general, there should be 12-25 copies all in all.
Drupal Backup Copies
Drupal Backup and Migrate allow it to make a backup copy or restore a database and website files effortlessly and for free. All that you need to do is:
- Download the module from drupal.org
- Install and run it in the «Modules» section
Creating a Drupal database backup copy of the system’s current state
On the module configuration page admin/config/system/backup_migrate, you can choose the object as well as the archive location. What you should do next is:
- Add and save a new profile in the corresponding tab. There are only two options to change in settings: profile’s name (choose the copy title) and compression type (it is advised to pick Zip).
- Go to the ‘Backup’ section. If you click the backup now option, then the database backup copy will be saved on the computer. In case you choose Manual Backups Directory – the copy will be saved to the sites/default/files/backup_migrate/manual folder (by default option may differ depending on the settings).
- Click “Start backup now” and save the copy to your computer.
Automatic database backup setup and its redirection to the email
In order to carry the backups regularly and send them to your email, you should do the following:
- Open the “Destinations” tab and click “Add destination.”
- Choose “Email” to send the archive as an attachment to a stated email address. You should provide and save the “Destination Title” and “Email address.”
- Follow the “Schedule” tab and click the “Add schedule” button.
- You should fill all the fields out, including the task title, profile configurations, frequency, and backup destination. After that, you can save the schedule.
Now, you can congratulate yourself since the backup will be carried out automatically over a set period of time, and it will be sent directly to your email. So far, you have learned all about the Backup and Migrate operation and we can proceed with other functions and features.
Drupal file backup copies
All the file backup is carried out with the help of the Backup and Migrate Files module. However, it should be added that Drupal file backup is a lot easier to do manually. Should you need to reanimate your website, make use of the following:
- Catalog/sites ─ the main Drupal folder containing the file with all configurations, themes, and installed modules. It should be copied regularly.
- .htaccess and robot.txt files ─ crucial files that are saved once after the website creation as well as every modification.
Restoration from backup copies
To restore your databases from a backup copy, you should choose the Restore option. After that, go to Advanced Settings and mark the Take site offline option. Now you can press Restore Now.
Sometimes a website may be running, but there is a need to restore separate files. That’s when you can go back a few days when those files were still operating. To do that, you should choose the correct archive saved on your computer and press the Restore button. However, you should not forget to back up the current database before going back.
In case the website is entirely unresponsive, you should do the following:
- Upload a website’s database from the archive created with the help of the Backup and Migrate module.
- Send all the Drupal files to the server. You can use the free ftp client from FileZilla for this purpose.
- Download htaccess, robot.txt, and folder /sites to the root catalog. If the database destination has been changed, you should edit the settings.php file in /sites/default catalog.
Best practices of Drupal backup
General recommendations on backup use:
- It is mandatory before every Drupal update. While being updated, the database can be damaged, you may accidentally delete catalog/sites, and the website won’t launch.
- Before every update, transfer, cleaning, optimization, or substitution of the database.
- Regularly: set the automatic backup of the database up and copy it to the computer folder /sites from time to time. You can create a separate backup copy monthly, weekly, daily, or as often as a website requires.
- Add dates to your backup copies and keep them stored in another web-server. Stick to the rule – if the data is not saved in three different storages – it does not exist.
- Inquire about your Internet provider or web hosting backup policy. Most of them have a backup plan, which activates every 24 hours. In case there is none – you are going to do it on your own.
- Evaluate the backup algorithm depending upon the amount of data you can afford to lose.
- Document and test the backup procedure as well as the restoration process.
This is it. Now, you are well aware of how to backup a website with Drupal. We sincerely hope that our article and general recommendations will help you create a safe and secure system so that there are no issues to face with your website in the future. In case you doubt your skills, you can always reach out to IDAP. We know all about Drupal, and we are ready to offer a helping hand!