Skip to content

Instantly share code, notes, and snippets.

@ADoebeling
Last active September 15, 2015 13:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ADoebeling/40fd031a9f54f3aee0a3 to your computer and use it in GitHub Desktop.
Save ADoebeling/40fd031a9f54f3aee0a3 to your computer and use it in GitHub Desktop.
Backup eines CMS
# How to backup a CMS
#
# @Author: Andreas Doebeling <ad@1601.com>
# @Copyright: 1601.communication gmbh
# @Link: http://www.1601.com
# 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 -h mysql5.1601-hosting.com -u dbXXXX -p dbXXXX > dbXXXX_YYMMDD_1XX.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
@ADoebeling
Copy link
Author

Hinweis:
-p dbXXXX ist korrekt. -p fragt nach dem Passwort, aber nicht als Parameter, sondern danach als interaktive Eingabe (damit das PWD nicht im Log gespeichert wird & nicht sichtbar ist).
Der danach folgende Parameter dbXXX steht für den Datenbank-Namen (im Vergleich zu -u - hier stand er für den Usernamen)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment