Webmaster's Community

Webhosting Forums => Dedicated Server Administration => Topic started by: Anay on December 19, 2011, 06:01:00 AM

Title: restoring database from zip file using ssh (mysql)
Post by: Anay on December 19, 2011, 06:01:00 AM
Hi

I have database backup which is .zip format and now I need to restore it to a database. I know how to do it for simple sql file but I don't know how to do it diretly from zip file. I can uncomress it and then restore it but I want to do it in one line.

For simple upload ie. uncompress file I do like this :
Code: [Select]
mysql -u user -ppassword -D databasename < backupfile.sql

How can do it directly ie uncompressing and restoring both at same time..