This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const archiver = require('archiver'); | |
| const { exec } = require('child_process'); | |
| require('dotenv').config(); | |
| const SMB_USER = process.env.SMB_USER; | |
| const SMB_PASSWORD = process.env.SMB_PASSWORD; | |
| const SMB_SERVER = process.env.SMB_SERVER; | |
| const SMB_DIR = process.env.SMB_DIR; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs") | |
| const path = require("path") | |
| const getAllFiles = function(dirPath, arrayOfFiles) { | |
| files = fs.readdirSync(dirPath) | |
| arrayOfFiles = arrayOfFiles || [] | |
| files.forEach(function(file) { | |
| if (fs.statSync(dirPath + "/" + file).isDirectory()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html | |
| aws s3 cp {local_dir} s3://{remote_dir} --recursive |