To Restore MongoDB Database and Files into AWS S3 Bucket
It will download your MongoDB dump file with archive from AWS S3 Bucket and copy it into your local storage and restore it into your database
It's located in database
directory and following is brief description about the config file:
- Change config file inside
configs/configs.json
with appropriate information about your database and S3 Bucket uri
is connection string used to connect into your databasearchivename
is your archive name that will be used as prefix to get your archive file list from S3 Bucketdestpath
is destination directory for your dump files from S3 Bucketretentionday
key use to set maximum object fetched from S3 bucket- If you set “retentionday: 0” the maximum object fetched will be 10
region
is your S3 Bucket regionbucket
is your S3 Bucket namefolder
is your folder in S3 Bucket, if any, and it will be used as prefix before “archivename” key- To test it just run
go run main.go
. - To run it in scheduler just build it and add parameter
-config=yourconfigfilelocation
.
It will download all your files in a given S3 Bucket into your local storage
It's located in file
directory and following is brief description about the config file:
- Change config file inside
configs/configs.json
with appropriate information about your files directory location and S3 Bucket dirpath
is your download directory locationregion
is your S3 Bucket regionbucket
is your S3 Bucket namefolder
is your folder in S3 Bucket, if any, and it will be used as a prefix to get your all files from S3 Bucket- To test it just run
go run main.go
. - To run it in scheduler just build it and add parameter
-config=yourconfigfilelocation
.