nicklasos / cyclic-backups

Mysql cyclic backups to S3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MySQL backups

export AWS_ACCESS_KEY_ID="id"
export AWS_SECRET_ACCESS_KEY="secret"

node mysql \
--config=config.cnf \
--db="dbname"  \
--bucket="aws-backup-bucket" \
--ignoreTables="sessions,logs"
--file="backup/{host}/{year}/{month}/{day}/{week}/{hours}/{minutes}/{seconds}/{timestamp}.dump.sql.gz"

--config in optional, use mysql config editor

config.cnf

[client]
user=root
password=password
host=localhost

Mysql config editor

Use mysql config editor instead of config.cnf

Files backups

export AWS_ACCESS_KEY_ID="id"
export AWS_SECRET_ACCESS_KEY="secret"

node files \
--dir="/var/www/files/" \
--bucket="aws-backup-bucket" \
--file="backup/{host}/{year}/{week}/{month}/{day}/{hours}/{minutes}/{seconds}/{timestamp}.dump.tar.gz"

About

Mysql cyclic backups to S3


Languages

Language:JavaScript 100.0%