title | level |
---|---|
database:import |
intermediate |
Nut's database:import
command emport database records from a YAML or JSON
file.
php ./app/nut database:import [options]
Option | Description |
---|---|
-f, --file[=FILE] |
A YAML or JSON file to use for import data. Must end with .yml, .yaml or .json |
-d, --directory[=DIRECTORY] |
A source directory. YAML or JSON files generated by the export command will be parsed in order |
--overwrite |
Allow overwriting of existing records |
$ php ./app/nut database:import --file=my-site-export.json --overwrite
[WARNING] This command may overwrite or replace data in the current database.
Are you sure you want to continue with the import (yes/no) [yes]:
> y
! [NOTE] Processing:
! - Export date: [date-of-export here]
! - Bolt version: %%VERSION%%
! - Origin platform: sqlite
!
! [NOTE] Records imported
* - 5 records for 'pages'
[OK] Complete