Posts Tagged With: restore

Backup and Restore Boot sector

Tagged with: , , , , , , ,

Use these commands to backup/restore your boot sector

dd if=/dev/hda of=bootsector.img bs=512 count=1 # backup
dd if=bootsector.img of=/dev/hda #restore

Original Article

No Comments »

Backup MBR to Image File

Tagged with: , , , , , , ,

Make a copy of MBR (Master Boot Record) to a file.

dd if=/dev/hda of=mbr.img bs=512 count=1

dd if=mbr.img of=/dev/hda bs=512 count=1 #restore the MBR
No Comments »

Import All MySQL Sql Dumps in a Folder

Tagged with: , , , , , , , , , ,

This command will import all the MySQL sql dumps in the current folder. You can use this to restore your backuped databases.

for i in *; do mysql -uroot `basename $i .sql` < $i;  done
No Comments »

Restore Backup Created by dump

Tagged with: , , , ,

Restoring a backup created by the dump command.

restore -if home_backup.bak
1 Comment »

Backup All Databases in MySQL

Tagged with: , , , , , ,

Backup all files in /var/lib/mysql to another folder

To restore, stop mysqld if it is running

service stop mysqld

Move all database files back to /var/lib/mysql. Make sure that all the folder and files in that folder belongs to mysql

chown -R mysql.mysql /var/lib/mysql

Try starting mysql

service start mysqld

1 Comment »

MySQL Database Backup/Restore

Tagged with: , , , , , , , ,

This command can be used to backup MySQL database.

mysqldump -u <User> -p <Database name> [<Table name>] > backup.sql

This command will create a file ‘backup.sql’ that will have all the data of the Database. The <Table name> is optional.

The database can be restored from such a dump using the command

mysql -u <User> <Database name> < backup.sql


I backup all the task in Nexty using this command.

mysqldump -u root Apps_Nexty > nexty.sql

This will create a file called ‘nexty.sql’ – which can be restored using the command…

mysql -u root Apps_nexty < nexty.sql