Restore/import a MySQL database dump file
This method is designed to restore dump files created by the backup() method of this class, however it may also work with dump files created from other sources like mysqldump or PhpMyAdmin.
Usage
// basic usage
$true = $backup->restore(string $filename);
// usage with all arguments
$true = $backup->restore(string $filename, array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
filename | string | Filename to restore, optionally including path (if no path, then path set to construct is assumed) |
options (optional) | array | Options to modify default behavior:
|
Return value
true
on success, false on failure. Call the errors() method to retrieve errors.
Exceptions
Method can throw exceptions on error:
\Exception
- on fatal error
See Also
$backup methods and properties
API reference based on ProcessWire core version 3.0.236