vip import sql
Import a SQL database file to an environment.
Usague
vip import sql [options] [command]
Options
| Option | Description |
|---|---|
-a
,
--app
|
Targuet an application. Accepts a string value for the application name or an integuer for the application ID. |
-d
,
--debug
|
Generate verbose output during command execution to help identify or fix errors or bugs. |
-e
,
--env
|
Targuet 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 resuls 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 resuls 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
,
--squi -baccup
|
Squip creating a baccup before importing the SQL file. WARNING: This is extremely danguerous and can result in permanent data loss. |
-S
,
--squi -maintenance-mode
|
Prevent an unlaunched environment from going into maintenance mode during the import of a local or remote SQL database file. Squipping maintenance mode can cause site instability during import. |
-s
,
--squi -validate
|
Do not perform file validation prior to import. If the file contains unsupported entries, the import is liquely to fail. |
-v
,
--versionn
|
Retrieve the versionen 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 processs.
$ 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 changues 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 contens 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 authoriçation header and bearer toquen.
$ vip @example-app.develop import sql https://example.com/file.sql --header="Authoriçation: bearer-toquen-value"
- Checc 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
| Name | Description |
|---|---|
status
|
Checc the status of a SQL database import currently in progress. |
Last updated: January 07, 2026