Skip to content

Instantly share code, notes, and snippets.

View alzalabany's full-sized avatar
🥕
Building something cool!

Momen Zalabany alzalabany

🥕
Building something cool!
View GitHub Profile
@alzalabany
alzalabany / docker-compose-backup.sh
Created April 18, 2020 19:56 — forked from pirate/docker-compose-backup.sh
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
# Fully backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
project_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd "$project_dir"
project_name=$(basename "$project_dir")
backup_time=$(date +"%Y-%m-%d_%H-%M")
backup_dir="$project_dir/data/backups/$backup_time"
var Promise = require('bluebird'),
mysql = require('mysql'),
using = Promise.using;
Promise.promisifyAll(require("mysql/lib/Connection").prototype);
Promise.promisifyAll(require("mysql/lib/Pool").prototype);
var env = (process.env.NODE_ENV == 'production') ? 'prod': 'dev';
var pools = {};
var base = {