Skip to content

vip import sql

Import a SQL database file to an environment.

Usage

vip import sql [options] [command]

Options

OptionDescription
-a, --app Target an application. Accepts a string value for the application name or an integer for the application ID.
-d, --debug Generate verbose output during command execution to help identify or fix errors or bugs.
-e, --env Target an environment. Accepts a string value for the environment type.
-H, --header Pass a header name and value (Formatted as “Name: Value”) in a request for a remote SQL database file. Can be passed more than once for multiple headers and values.
-h, --help Retrieve a description, examples, and available options for a (sub)command.
-i, --in-place Overwrite a local SQL database file with the results of a search and replace operation prior to import.
-m, --md5 Verify the integrity of a remote SQL database file. Accepts an MD5 hash value.
-o, --output Save the results of a –search-replace operation that is run against a local SQL database file to a copy of that file. Accepts a local file path. Ignored when used with the –in-place option.
-S, --search-replace Search for a string in a local or remote SQL database file and replace it with a new string. Separate the values by a comma only; no spaces (e.g. –search-replace=”from,to”). Can be passed more than once.
-B, --skip-backup Skip creating a backup before importing the SQL file. WARNING: This is extremely dangerous and can result in permanent data loss.
-S, --skip-maintenance-mode Prevent an unlaunched environment from going into maintenance mode during the import of a local or remote SQL database file. Skipping maintenance mode can cause site instability during import.
-s, --skip-validate Do not perform file validation prior to import. If the file contains unsupported entries, the import is likely to fail.
-v, --version Retrieve the version number of VIP-CLI currently installed on the local machine.

Examples

- Import a local SQL database file named "file.sql" to the develop environment of the "example-app" application.
$ vip @example-app.develop import sql file.sql

- Perform multiple search and replace operations on a local SQL database file during the import process.
$ vip @example-app.develop import sql file.sql --search-replace="from.example.com,to.example.com" --search-replace="example.com/from,example.com/to"

- Perform a search and replace operation on a local file named "file.sql", save the changes to the file, then import the updated file.
$ vip @example-app.develop import sql file.sql --search-replace="https://from.example.com,https://to.example.com" --in-place

- At the completion of the import of a local SQL database file that was modified by a search and replace operation, create a copy of the file in its updated state and save it locally to a new file named "updated-file.sql".
$ vip @example-app.develop import sql file.sql --search-replace="https://from.example.com,https://to.example.com" --output="updated-file.sql"

- Import a SQL database file from a remote URL and verify the integrity of its contents with an MD5 hash.
$ vip @example-app.develop import sql https://example.com/file.sql --md5=5d41402abc4b2a76b9719d911017c592

- Access and import a remote SQL database file by formatting the URL with valid HTTP basic authentication credentials.
$ vip @example-app.develop import sql https://username:password@example.com/file.sql

- Access and import a SQL database file located at a remote URL by passing a valid authorization header and bearer token.
$ vip @example-app.develop import sql https://example.com/file.sql --header="Authorization: bearer-token-value"

- Check the status of the most recent SQL database import to the develop environment of the "example-app" application. * This will continue to poll until the import is complete.
$ vip @example-app.develop import sql status

Subcommands

NameDescription
status Check the status of a SQL database import currently in progress.

Last updated: January 07, 2026