Herdanis / Duat

Duat is OpenSource project which is the script to remote or locally backup database like mysql, postgre, etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project logo

Project Duat

Status GitHub Issues GitHub Pull Requests License


πŸ“ Table of Contents

🧐 About

Duat is OpenSource project which is the script to remote or locally backup database like mysql, postgre, etc.

🏁 Getting Started

You need your user for connect to database. If you using remote database please check the firewall and ip rule on database config. We recommend not give userbackup privilage to write database or table.

Installing

Just run init.sh to setup your file.

bash init.sh

After that edit .env. You must setup the path to save the database and time periode database will be save

TIME_PERIOD=30 // by default 30 days

PATH_BACKUP=PATH // required

For example we want to backup the mysql, change the variable for mysql

MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USERNAME=username
MYSQL_PASSWORD=password
MYSQL_DATABASE=db_name

πŸ—’ Note : you do not have to setup all environment variable just select variable you want to backup

🎈 Usage

Run with bash or sh it will automatic run the command

bash mysql.sh

If you want to run automatic everyday use cronjob to run it, just setup in crotab

Example run cronjob at 00.01 AM every day

1 00 * * * bash /path/to/file/mysql.sh

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

πŸŽ‰ Acknowledgements

About

Duat is OpenSource project which is the script to remote or locally backup database like mysql, postgre, etc

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%