As a System Administrator the main key task is to take backup on daily or weekly basis. Backup is the most important task to recover data from any disaster or data corruption.
In my previous article MySQL Database Backup From The Command Line. I have explained how you can take MySQL Backup backup using dump command. And in this article I will explain how you can restore database from dump file. Restoring database from dump file it is very easy. Follow the below command.
Restoring A Backup
Since the dump files are simply SQL orders, you can re-establish the database backup by advising MySQL to run the charges in it and put the information into the best possible database.
# mysql database_name < database_name.sql
In the above command you can see “database_name” is the name of database you can want to restore, and “database_name.sql” is the name of dump file to be restored.
If you want to restore a single database from dump of all the database, you can type the below command:
# mysql --one-database database_name < all_databases.sql
Restoring Databases From cPanel Backups
There is no exceptional intelligence to pass on to you with respect to re-establishing databases from cPanel backups. On the off chance that you don’t wish to utilize cPanel’s programmed techniques for re-establishing whole records, you can open up the individual backup on the command line, discover the MySQL dump file you wish to restore, and use the above orders to play out the restore.
Thanks:)
If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.
Leave a Comment