Skip to content

Simple script in python using mysqldump tools, define cron backup your database mysql save in CDN bunny

Notifications You must be signed in to change notification settings

jhowbhz/auto-backup-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Auto Mysql Bunny

Simple script in python using mysqldump tools, define cron backup your database mysql save in CDN bunny

Download scripts

git clone https://github.com/jhowbhz/auto-mysql-bunny.git scripts

Install dependencies

apt install python3 -y && apt install python3-pip -y

Install project

cd /opt/scripts/ && pip3 install -r requeriments.txt

Credentials

Especifique as suas credenciais do MYSQL e do FTP do Bunny

cp .env-example .env
nano .env
MYSQL_HOST=seu_host
MYSQL_PORT=sua_porta
MYSQL_USER=seu_usuario
MYSQL_PASSWORD=sua_senha
MYSQL_DATABASE=seu_banco_de_dados
FTP_HOST=seu_host_ftp
FTP_USERNAME=seu_usuario_ftp
FTP_PASSWORD=sua_senha_ftp

Crontab

Vamos acessar a cron

crontab -e

Cron def 03:00 AM

0 3 * * * python3 /opt/scripts/bk.py

Run

python /opt/scripts/bk.py

Configure Bunny CDN receive Backup FILES

Get your FTP information

https://bunny.net

About

Simple script in python using mysqldump tools, define cron backup your database mysql save in CDN bunny

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published