Nut command / Database / database:import
Note: You are currently reading the documentation for Bolt 3.7. Looking for the documentation for Bolt 5.2 instead?
Nut's database:import
command emport database records from a YAML or JSON
file.
Usage¶
php ./app/nut database:import [options]
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 |
Example¶
Importing 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: 3.7
! - Origin platform: sqlite
!
! [NOTE] Records imported
* - 5 records for 'pages'
[OK] Complete
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.