Skip to content

Instantly share code, notes, and snippets.

@atomsfat
Last active December 21, 2015 00:18
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 atomsfat/6218618 to your computer and use it in GitHub Desktop.
Save atomsfat/6218618 to your computer and use it in GitHub Desktop.
Mysql backup shell
#!/bin/bash
fecha=$(date +%Y%m%d_%H%M)
echo "ready to dump database"
mysqldump -u root database --ignore-table=logs > /tmp/dump-$fecha.sql
echo "comprimiendo"
pbzip2 /tmp/dump-$fecha.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment