ABHIONLINUX
Site useful for linux administration and web hosting

2009/10/01

How to take mysql backup and restore

To take the backup
---------------
mysqldump database > databasebackup.sql

To restore the mysql backup
---------------------------
mysql database < databasebackup.sql

To unzip database.sql.gz
------------------------
gunzip database.sql.gz

Unable to open pty: No such file or directory

While trying to login to the VPS , if you are getting the error
Unable to open pty: No such file or directory
Please try the commands in the main node VPS.

vzctl exec VEID /sbin/MAKEDEV pty
vzctl exec VEID /sbin/MAKEDEV tty

This will fix your issue.