directus-clone-files
v1.0.2
Published
Directus Clone Files is a CLI tool that provides a way to sync files between two different projects
Downloads
123
Maintainers
Readme
Copy assets between two Directus projects
This tool allows you to copy assets from one project to another keeping the same ID. This is useful if you are Exporting/Importing data that include relations to Directus Files but those files are not on destination.
Usage
These tool can work in two different ways:
Interactive
In this mode, the tool will ask for the information needed
$ npx directus-clone-files
Non Interactive
In this mode, you pass the required information via options and environment variables:
SOURCE_PASSWORD=password DESTINATION_PASSWORD=password npx directus-clone-files --source_url https://source.example.com --source_email [email protected] --destination_url https://destination.example.com --destination_email [email protected]
Notes
All files will be imported to a folder named Imported (YYYY-MM-dd HH:mm)
.
In case something goes wrong, you can delete the imported using:
{
"filter": { "folder": { "name": { "_eq": "Imported (YYYY-MM-dd HH:mm)" } } }
}