Skip to content

Instantly share code, notes, and snippets.

@LBeckX
Last active April 26, 2023 07:43
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 LBeckX/d46bb98687ae37e6bb5ce6c6cb2f505c to your computer and use it in GitHub Desktop.
Save LBeckX/d46bb98687ae37e6bb5ce6c6cb2f505c to your computer and use it in GitHub Desktop.
cmsBackup.sh
# Switch to customer-folder
cd /$PATH/
# Check the current mySQL-Config
cat www/htdocs/system/config/localconfig.php (e.g.)
# Backup MySQL
mysqldump --default-character-set=utf8 --routines -u dbXXXX -p dbXXXX > dbXXXX_YYMMDD_1XX.sql
# Bei Fehler `mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces`
# mysqldump --default-character-set=utf8 --routines -u dbXXXX -p dbXXXX --no-tablespaces > db.sql
# Backup www and/or htdocs
cp -R www www_YYMMDD_1XX
# Backup www and/or htdocs as TGZ (has to contain the mysql-backup!)
tar czf www_mysql_YYMMDD_1XX.tgz www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment