skip to Main Content

i don’t know how should i implement this feature

I want to have a backup from my database and file storage in the Laravel project.
it must get a backup every day and send it to the backup server

and my project is dockrized.

2

Answers


  1. I assure you that what you want to do is very important for the security of your project, however these backups can increase the inodes of your site and even saturate your disk space on your server. If you use shared hosting like Proposer Hostinger, you will have this option by default. In addition to the database, you can also recover files from an old version up to 1 month old.

    This is the simplest way, otherwise, you must create a command with a job that will execute the download and send it to the desired location.

    Be careful, I assure you that it is a complex choice.

    Login or Signup to reply.
  2. You can use spatie/laravel-backup package for both DB and Storage backup. You can select folders that need backup and can set a cron for the backup process. This package can also send notifications when something goes wrong with backups. You can set up Slack, email, or other notifications. Check the documentation for a detailed guide.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search