Migrate from a v8 instance to v9 instance.
This tool will copy over:
- Schema (collections / fields)
- Files (including file contents)
- User data (eg all items in all collections)
- Roles
- Users
Note: This tool will NOT copy over:
- Interface/display configurations
- Permissions
- Activity / revisions
- Clone this repo
- Add a .env file with the following values:
You SHOULD use either Cookie or JWT authentication (leaving one or the other empty).
Using Cookie Authentication
provides you with more time to migrate large amounts of data like the project files.
See documentation for more details on obtaining authentication tokens on Directus v8.
V8_URL="https://v8.example.com"
V8_PROJECT_NAME="project"
V8_TOKEN="admin"
V8_COOKIE_TOKEN="cookie_value"
V9_URL="https://v9.example.com"
V9_TOKEN="admin"
- Run
npm install
- Run the
index.js
file:node index.js
You can exclude collections/database tables from being migrated by using:
node index.js -s <table_name> <another_table_name>