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
connectionStr
of bothmongodb.source
andmongodb.target
objects - Edit the
s3
object. The sample configuration file is based on Minio storage backend.- set
skipUploaded
totrue
if you want the script to check the target DB for the existence of the datastream prior to upload, set tofalse
to reupload / update the datastream - set
logS3UploadProgress
totrue
log the upload progress
- set
- Create an entry in
~/.aws/credentials
for 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>