- Mount Blob storage as a file system on Linux https://docs.microsoft.com/en-us/azure/storage/blobs/storage-how-to-mount-container-linux
Last active
April 30, 2019 09:43
-
-
Save denisivan0v/019883fce1d7053ab0b4233e905ef3c0 to your computer and use it in GitHub Desktop.
TVP migration
- To start a new session
$ tmux
- To list active sessions
$ tmux list-sessions
- To attach to session
$ tmux attach -t <session name>
- To deattach form the session
CTRL+b, then d
This file contains 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
#!/bin/bash | |
echo "Source directory: '$1'" | |
echo "Target directory: '$2'" | |
echo "Log files directory: '$3'" | |
if [ ! -d $2 ]; then | |
mkdir -p $2; | |
fi | |
if [ ! -d $3 ]; then | |
mkdir -p $3; | |
fi | |
for D in `find $1 -mindepth 1 -maxdepth 1 -type d` | |
do | |
FILENAME=$(basename "${D}").tar | |
FILEPATH=$2/$FILENAME | |
LOG_FILENAME=$(basename "${D}").log | |
LOG_FILEPATH=$3/$LOG_FILENAME | |
echo "Packing and uploading directory '$D'..." | |
tar cv --ignore-failed-read $D 2>$LOG_FILEPATH | (pv -p --timer --rate --bytes > $FILEPATH) | |
if [ $? -eq 0 ]; then | |
echo "Directory '$D' has been successfully uploaded as '$FILEPATH'"; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment