Skip to content

neputertech/app-db-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Backup project (app) & mysql database

Usage

 git clone https://github.com/neputertech/app-db-backup.git ~/app-db-backup

 cd ~/app-db-backup/please-do-not-delete/scripts

 find ./* -name "*.sh" | xargs chmod +x

 cp .env.example .env
 cp .mysqldumpcred.example .mysqldumpcred

For the skeleton I'm using default variables & value. Please change according to your need

  1. Copy .env.example as show in above and change the values.

  2. Copy .mysqldumpcred.example as show in above and change the values.

Cronjob

To set up cronjob, use any of your convenient time
Recommended (at night)

0 23 * * * cd /home/user/app-db-backup/please-do-not-delete/scripts && ./dbbackup.sh  > /home/user/app-db-backup/please-do-not-delete/logs/dbbackup.log 2>&1

2 23 * * * cd /home/user/app-db-backup/please-do-not-delete/scripts && ./appbackup.sh > /home/user/app-db-backup/please-do-not-delete/logs/appbackup.log 2>&1

About

Backup mysql database & app directories.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages