Skip to content

DumpSync Command: Import

To restore a database dump, you can use the following command:

dumpsync import -f /path/to/dump.sql

Command Breakdown

  • dumpsync: This is the main command to invoke the DumpSync tool.

  • import: This subcommand initiates the import process to restore the database from the specified dump file.

Options

  • -f /path/to/dump.sql: Specifies the path to the dump file that you want to restore. Replace /path/to/dump.sql with the actual file path to your SQL dump file.

Example

To restore a database from a dump file located at /backups/example_dump.sql, you would run:

dumpsync import -f /backups/example_dump.sql

Notes

  • Ensure that the dump file exists and that you have the necessary permissions to read it.
  • The import process will overwrite existing data in the database, so be cautious when using this command, especially if restoring to a production environment.
  • It’s recommended to back up current data before performing an import to avoid accidental data loss.