Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Freek Van der Herten:
Taking care of backups with Laravel
Sep 19, 2016 @ 14:34:13

Freek Van der Herten has posted a new article to his site covering the backup of your Laravel-based application with a handy package, laravel-backup. He's released a new major version so he wanted to catch you up on some of the features and functionality the package includes and how to use them for your application.

A new major version of laravel-backup was recently tagged. This package can backup files and databases of your Laravel app (or any PHP application really). The backup consists of a zipfile containing a dump of the databases and all files that are selected for backup. The package will copy over the zipfile to external storage such as S3, Dropbox, SFTP, … If something goes wrong during the package can notify you via, amongst others, mail or Slack. In this post I’d like to give some background on why and how it was built.

Keep in mind that there is no one size fits all solution for backups. A small company will probably handle backups in another way than a bigger company. This post has small companies in mind with a couple of developers and no dedicated operations person or team.

He starts off talking about "modern hosting" services and some of the issues that can come with them (downtime being one of the worst). He point out that providers like Linode and DigitalOcean only make periodic backups of your application and restoring from these could mean a lot of data loss - one of the worst things that can happen to an online business. With the laravel-backup package protecting against this kind of failure is easier, letting you automatically back up your site to an off-server source (like S3, Dropbox, or even another local location). He also describes the handling to clean up old backups, sending notifications when problems come up and simple monitoring functionality. He ends the post by mentioning once again that this package is designed for use with small-to-medium sized applications. Larger ones should work up a more robust, possibly external solution that doesn't rely on the application framework for its functionality.

tagged: backup laravel package laravelbackup tutorial downtime

Link: https://murze.be/2016/09/taking-care-of-backups-with-laravel/


Trending Topics: