We backup a database daily with mysqldump using the following options:
--quick --hex-blob --lock-tables --skip-extended-insert --flush-logs --max_allowed_packet=500M
Each database gets its own directory and that directory has a .sql
file for each table in the database.
I recently tried to do a test restore and I get the following error over and over for each table in the .sql
file I try to import:
ERROR 1017 (HY000): Can't find file: './WhateverTableIQuery.frm' (errno: 13)
The .frm
files are indeed on the source machine but all I'm getting in the backup is tarballs of .sql
files.
Am I doing the backup wrong or the restore wrong?
.sql
file! Are you doing backup for each table by itself? Normally, each DB would have its own.sql
file, or all DBs in one file. Verify that please then we go futhermysqldump
command with its options and output redirection?WhateverTableIQuery
is an actual table, not aview
It could be that you're generating a backup of a view.