To decompress a file with .tar.gz extension use the command line below :
1 |
tar -zcvf backup_DATE.tar.gz web |
Phpmyadmin, it is pretty, it is practical but compared to the use of mysql command line via ssh for example on your dedicated server, it has nothing to do when you start a process large databases sql several mega.
Indeed to a mysql export, if one goes through php we already have the max-execution time which may cause us problems.
Something that does not happen with tools like mysqldump.
To make a backup of the database mysql, here is the syntax:
1 2 |
mysqldump -u user_name -p db_name | gzip -v > backup.sql.gz mysqldump -u USER -pPWD --opt DB -h SERVER > backup.sql |
Do not forget to paste the password to the ‘p’.
Finally to import a mysql database on the command line is almost identical:
1 |
mysql -u USER -pPWD -h SERVER -D DB_NAME < backup.sql |
Little tip, if you want to import a mysql specifying the encoding, use the –default_character_set utf8 option
1 |
touch newfile |
Check installed PHP extensions
1 |
php –me |
Checking your Ubuntu Version
1 |
lsb_release -a |
No comments yet.