d3b-center/data-hd-export

Name: data-hd-export

Owner: Center for Data Driven Discovery in Biomedicine

Description: null

Created: 2017-03-13 21:07:43.0

Updated: 2017-03-13 21:07:47.0

Pushed: 2017-03-13 21:15:16.0

Homepage: null

Size: 3

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Export data to hard drive

key steps:

generate key

ssl rand -base64 256 > $outputdir/encryption.key
d 400 $outputdir/encryption.key

aes encryption

ssl aes-256-cbc -salt -in $input -out $output -pass file:$encryption.key

decryption

ssl aes-256-cbc -d -in $input -out $output -pass file:$encryption.key
shell script

usage:

and.sh enc manifest_file output_dir # encryption
and.sh dec manifest_file encryption_key output_dir #decryption

manifest_file is a list of files with relative dir path, something like the output from ls

er1/file1.fq
er1/file2.fq
er2/file3.fq
er2/file4.fq

The script will auto-md5sum original files and encrypted files at the same time.

The tree will be like:


folder1
??? file1.fq
??? file2.fq
folder2
??? file3.fq
??? file4.fq
manifest
output_folder
??? folder1
?   ??? file1.fq
?   ??? file2.fq
??? folder2
?   ??? file3.fq
?   ??? file4.fq
??? encryption.key
??? manifest
??? md5sum.encrypted.txt
??? md5sum.original.txt

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.