Code PowerShell of Backup Databases from SQL Server to S3 bucket files

Here is the code, read it carefuly it’s much simple

################################## Preparing Env

New-Item -Path “C:\” -Name “tempSqlBackup” -ItemType “directory” -Force
New-Item -Path “C:\” -Name “tempSqlZip” -ItemType “directory” -Force

$SqlBackup = “C:\tempSqlBackup\”
$SqlZip = “C:\tempSqlZip\”

################################## Backup DBs except tempdb, master
Import-Module SQLPS

$serverInstance = “localhost\SQLEXPRESS” # ← — — — Specify the instance name

$databases = Get-SqlDatabase -ServerInstance $serverInstance | Where { ($_.Name -ne ‘tempdb’) -and ($_.Name -ne ‘master’) }

foreach($database in $databases){
$dbName = $database.Name
Backup-SqlDatabase -ServerInstance $serverInstance -Database “$dbName” -BackupFile “$SqlBackup\$dbName.bak” #-CompressionOption On -Checksum
}

#Remove-Module -Name SQLPS
################################## folder compressing

$DT = Get-Date -UFormat “%Y-%m-%d-%H-%M”
compress-archive -path…


The hormone insulin secreted into the blood by cells in the pancreas called Langerhans Islands “the name after the scientist Paul Langerhans who discovered it.” It secretes insulin, which is responsible for regulating the level of glucose in the blood and the decrease in the hormone insulin in the blood leads to an increase in the level of glucose in the blood, As we can find the average person:

  • For a person fasting : from 72 to 99 mg/dL
  • Two hours after eating : Up to 140 mg/dL

Types of diabetes :

The first type, It is the complete inability of the cells in…


Hive is a data warehouse system which is used for querying and analysing large datasets stored in HDFS. It process structured and semi-structured data in Hadoop.

Hive Architecture


YARN — Yet Another Resource Negotiator, is a part of Hadoop 2 version, is one of the two major components of Apache Hadoop (with HDFS). It plans the use of cluster resources as well as the treatments applied to the data.

Architecture


HDFS (Hadoop Distributed File System) is a distributed file system for storing and retrieving large files with streaming data in record time. It is one of the basic components of the Hadoop Apache framework, and more precisely its storage system. HDFS Hadoop is one of Apache’s top level projects.

Architecture


MapReduce is a clustered data processing framework. Composed of Map and Reduce functions, it distributes data processing tasks between different computers, then reduces the results in a single summary.

How MapReduce works


we will use in this article ElasticSearch which is a flexible and powerful open-source, distributed real-time search and analytics engine. Using a simple set of APIs, it provides the ability for full-text search. Elastic search is freely available under the Apache 2 license, which provides the most flexibility.

How ElasticSearch works :

The ElasticSearch engine use two principal components which are the analysers and the inverted index to store(index) documents and retrieve them.

Understanding Analysis in Elasticsearch (Analyzers)

When we index a document, Elasticsearch takes the full text fields of the document and runs them through an analysis process. The text fields are tokenized into terms, and the terms…

ELMASLOUHY Mouaad

Computer science Engineer Student, A lover of everything that urges the mind to work hard such as Quantum Physics, General Medicine, Personal dev…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store