Skip to content

Instantly share code, notes, and snippets.

@lifeblood
Created May 26, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lifeblood/2bb857d79224282ab2aadb561f489e13 to your computer and use it in GitHub Desktop.
Save lifeblood/2bb857d79224282ab2aadb561f489e13 to your computer and use it in GitHub Desktop.
#!/bin/bash
time=$(date "+%Y-%m-%d %H:%M:%S")
cd /home/deploy/laradock
docker-compose exec workspace mysqldump -h mysql -u root --password=root default | gzip > /home/backup/db-$(date +\%F-\%T).sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment