GithubHelp home page GithubHelp logo

qirolab / laravel-backup-example Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 5.0 391 KB

Home Page: https://qirolab.com/posts/how-to-set-up-automatic-laravel-backup-for-database-and-files-1607270517

Shell 0.63% PHP 67.85% Blade 31.52%
laravel laravel-framework laravel-backup google-drive-backup dropbox-backup-script

laravel-backup-example's Introduction

Laravel Backup Example

This example repository shows, how to store Laravel backups on local storage, Google Drive, and Dropbox.

Video Tutorials

  1. Set up Automatic DB Backup in Laravel
  2. Store Automatic Laravel Backup On Google Drive
  3. Store Automatic Laravel Backup On Dropbox

How To Use This?

Download or clone this repo

$ git clone https://github.com/qirolab/laravel-backup-example.git

Install all dependency required by Laravel.

$ composer install

Generate app key, configure .env file and do migration.

# create copy of .env
$ cp .env.example .env

# create Laravel key
$ php artisan key:generate

# run migration
$ php artisan migrate

Configuration for Google drive

For Google drive backup, you need to provide these following variables in the .env file.

GOOGLE_DRIVE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=xxx
GOOGLE_DRIVE_REFRESH_TOKEN=xxx
GOOGLE_DRIVE_FOLDER_ID=null

To get the values for all these environment variables follow the steps mentioned this article:

Configuration for Dropbox

For Dropbox, add the following variable in the .env file.

DROPBOX_AUTH_TOKEN=xxx

Follow the steps on this article to get its value:

Take backups

php artisan backup:run

laravel-backup-example's People

Contributors

hkp22 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.