Skip to content

Instantly share code, notes, and snippets.

View jespernohr's full-sized avatar

Jesper Nøhr jespernohr

View GitHub Profile
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_min = 2
countryName_max = 2
stateOrProvinceName = State or Province Name (full name)
# Create privat key (4096 bit):
openssl genrsa -out domain.gl.key 4096
# Create CSR with subject alternative names config file (Certificate Signing Request):
openssl req -new -sha256 -key domain.gl.key -out domain.gl.csr -config openssl.cnf
# Verify CSR:
openssl req -text -noout -verify -in domain.gl.csr
# Verify Certificate
# login to azure from Microsoft Azure Storage Command line tools
azure login
# Create storage account
azure storage account create -l "North Europe" --type LRS storageaccount001
# Get storage account keys
azure storage account keys list storageaccoung001
# Create storage container
azure storage container create -a storageaccount001 -k 'KEYHERE' -p Off storagecontainer001
# Install repository in centos 7
sudo yum install http://mirrors.kernel.org/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# Update install catalog
sudo yum update
# Install the required development tools
sudo yum groupinstall Development Tools
# Install the required python tools
# Install python pip on Centos 7
sudo yum install python-pip
# Install azure sdk for centos 7
sudo pip install azure
# Create variables for duplicity
export AZURE_ACCOUNT_NAME=storageaccount01
export AZURE_ACCOUNT_KEY='KEYHERE'
export PASSPHRASE='NEWPRIVATEPASSWORDHERE'
# Run first full backup (next run will automaticaly be incremental)
duplicity full /testdata azure://storagecontainer001
# Output --------------
#Local and Remote metadata are synchronized, no sync needed.