Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # db config
- DB_NAME='dbname'
- DB_USER='root'
- DB_PASS='root'
- DB_HOST='localhost'
- DB_TABLES='modx_categories modx_categories_closure modx_site_htmlsnippets modx_site_plugins modx_site_snippets modx_site_templates modx_site_tmplvars modx_site_tmplvar_access modx_site_tmplvar_templates'
- # date format - used in back-up archive filename
- D=$(date +%Y-%m-%d)
- # set to exit on error
- set -e
- # backup the database
- mysqldump -u ${DB_USER} -p${DB_PASS} -h ${DB_HOST} ${DB_NAME} ${DB_TABLES} > ${DB_NAME}-${D}-elements.sql
Add Comment
Please, Sign In to add comment