TNG - Tips & Tricks
Please read first
Using TNG's backup (open Administration -> Utilities), the
backup files are stored on your website. To get them on your computer,
you must download the files in a second step.
To do backup and download in one step:
You need the mysqldump.exe program. It is part of the
MySQL suite: Documentation – Download.
- open your command line and run
mysqldump -h YOURMYSQLHOST -u YOURMYSQLUSER -p -B YOURDATABASE
- The program asks for your mysql password, reads the data from
your MySQL database and writes the backup to the specified text file
on your computers harddisc (change the file name and/or file path as
you like). The execution time for the backup depends from your network
connection (...be patient...).
- Put the completed call into a batch file/shell script. If you are
sure that no other people have access to your computer, you can store
the password within the batch file; use:
mysqldump -h YOURMYSQLHOST -u YOURMYSQLUSER -p YOURPASSWORD -B
((Replace the words written in capital letters against the
- To save disc space, you can move the backup file into a ZIP
archive: zip the_backup.zip the_backup.txt (your ZIP program
may have different parameters; read the documentation).
Restoring your data:
You need the mysql.exe program. It is part of the MySQL
suite: Documentation (Download: see above).
- Run mysql -h YOURMYSQLHOST -u YOURMYSQLUSER -p
Note the difference between ">" and "<":
">" means: 'Hi program, write your output into the
following file.' "<" means: 'Hi program, take your input
from the following file'. Speaking more technical, the
">" and "<" signs indicate the direction of
ATTENTION: starting the restore process, the contents of
your database will be replaced by the contents of your backup file
– without further warning!!! Be careful!
Other backup/restore tools
- If you are not familiar with command line usage, try MySQL
Administrator ( Download) which has a
very nice GUI.
- MySQLDumper is a PHP script
- You can't mix TNG's backup files and the backup files produced
with mysqldump – the file formats are different. (Open
the files with your favourite text editor and compare the contents.)
- You can't restore a backup from TNG v5 into TNG v6 because the
table structures are different!
Copyright © http://www.ahnendaten.de/tng/
Letzte Aktualisierung am 11. Juni 2017