Skip to content

Instantly share code, notes, and snippets.

View jmfederico's full-sized avatar

Federico Jaramillo Martínez jmfederico

View GitHub Profile
jmfederico / Makefile
Last active July 10, 2020 11:04
An awsome Makefile
# On OSX the PATH variable isn't exported unless "SHELL" is also set, see:
SHELL = /bin/zsh
TMPDIR := $(shell mktemp -d)
include .env
INTRO = "\n\e[33m------------------------------\e[32m\n$@\n\e[33m------------------------------\e[39m\n"
help: ## Prints this message
jmfederico /
Last active May 21, 2024 05:18
Script to create full/incremental backups with xtrabackup.
USEROPTIONS="--user=${MYSQL_USER} --password=${MYSQL_PASSWORD} --host=${MYSQL_HOST}"
FULLBACKUPCYCLE=604800 # Create a new full backup every X seconds
KEEP=1 # Number of additional backups cycles a backup should kept for.
START=`date +%s`
jmfederico /
Last active September 24, 2015 22:58
MySQL quick commands!
# BackUp
mysqldump --opt --password=miclave --user=miuser mibasededatos > archivo.sql
# BackUp to bz2
mysqldump --opt --password=miclave --user=miuser mibasededatos | bzip2 -c > archivo.sql.bz2