Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.12 KB

database-import.md

File metadata and controls

50 lines (34 loc) · 1.12 KB
title level
database:import
intermediate

database:import

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: %%VERSION%%
 !        - Origin platform: sqlite
 !

 ! [NOTE] Records imported

 * - 5 records for 'pages'

 [OK] Complete