This script migrates datastream data stored in GridFS into any S3-like Cloud storage backeend.
The script will stream both the download and upload of datastream data.
- Clone the
sample-config.json - Edit the
connectionStrof bothmongodb.sourceandmongodb.targetobjects - Edit the
s3object. The sample configuration file is based on Minio storage backend.- set
skipUploadedtotrueif you want the script to check the target DB for the existence of the datastream prior to upload, set tofalseto reupload / update the datastream - set
logS3UploadProgresstotruelog the upload progress
- set
- Create an entry in
~/.aws/credentialsfor the profile to be used in this migration, e.g. for Minio configured with the development environment:
[minio]
aws_access_key_id = minioadmin
aws_secret_access_key = minioadmin
- Set the profile in the shell environment. e.g.
export AWS_PROFILE=minio
node migrate.js <path to configuration file>