Taking Cold Database backup

Posted on: 2023-07-10 13:56:15


To restore a MySQL database from a cold backup, follow these steps:

  1. Shutdown the MySQL server:
  1. Copy the backup files to the appropriate location:
  1. Start the MySQL server:
  1. Verify the restored database:

Note: It's crucial to ensure that the backup files are from a consistent point in time and are not corrupted. Additionally, if you encounter any issues during the restoration process, consult the MySQL documentation or seek assistance from a database administrator.

Remember to adjust the file paths and commands mentioned above to match your specific server environment and file locations.

 

Physical Files backup using mysqlhotcopy (MyISAM tables)

 

 

Benefits of mysqlhotcopy

 

 

 

But:

 

$ mysqlhotcopy db_name /path/copy_to/

 

Physical InnoDB Files backup

 

    Shut down the MySQL instance gracefully

    $ mysqladmin -u root -p shutdown

 

    Backup the following file:

 

File Description

File name(s)

Path

Example

Datafiles (Shared tablespace )

/var/lib/mysql/ibdata*

/path/to/data

c:\mysql\data\ibdata1

Datafiles (individual tablespace)

*.ibd

/var/lib/mysql/mydb

c:\mysql\data\webdb*.ibd

Format files

*.frm

/var/lib/mysql/mydb

c:\mysql\data\webdb\tbl1.frm

Log files

ib_logfile*

/var/lib/mysql/ib_logfile1 iblogfile*

c:\mysql\data\ib_logfile*

Option file

my.ini/my.cnf

/etc/mysql/my.cnf

c:\mysql\mysql-5.1\my.ini

 



xedok When seeking the best software development companies Xedok Software is your ultimate choice. For Demos click here



Leave a reply