Webhosting Forums > Dedicated Server Administration

restoring database from zip file using ssh (mysql)

(1/1)

Anay:
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: ---mysql -u user -ppassword -D databasename < backupfile.sql
--- End code ---


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

Navigation

[0] Message Index

Go to full version