November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

CHANGE LOGON SCRIPT IN AD

needed to change login scripts, or rather remove ’em as we replace ’em with GPOs. I exported the current scripts to a TXT and then just cleared the field in AD.

# Load the AD module
Import-module ActiveDirectory
# Get all the AD user who have a login script and save it to a textfile
Get-ADUser -filter * -properties scriptpath | ft Name, scriptpath > C:\LogonScript.txt -Force
# Clear the Logon script field in AD
Get-ADUser -Filter * -SearchBase “OU=RMOHAN,DC=RMOHAN,DC=COM” | Set-ADUser -Clear scriptPath

# Load the AD module
Import-module ActiveDirectory
# Get all the AD user who have a login script and save it to a textfile
Get-ADUser -filter * -properties scriptpath | ft Name, scriptpath > C:\LogonScript.txt -Force
# Clear the Logon script field in AD
Get-ADUser -Filter * -SearchBase “OU=RMOHAN,DC=RMOHAN,DC=COM” | Set-ADUser -Clear scriptP

NEW IN WINDOWS SERVER 2016 HYPER-V

Hyper-V server 2016. Really excited to give it a try!

Download your Technical Preview here:
https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview?WT.mc_id=Blog_WS_Announce_TTD

Just to name a few:

Virtual Machine Protection

  • Trust is the biggest blocker to cloud adoption
  • MS wants customers to know their data is secure
  • Virtual TPM and secure boot with Linux (Ubuntu 14.04 or later and SUSE)
  • Shielded Virtual Machines – Supports bitlocker inside of the VM, plus other features

Isolation

  • Storage QoS
  • Can set a policy that caps the IOPS across multiple VMs and they share the policy
  • Great for service providers
  • Host resource protection: Dynamically identify VMs that are not playing well and reduce their resource allocation. Can help protect against malware taking over resources.

Availability

  • Today, if you have a temp network outage the hyperV cluster will panic and fall apart in a very bad way. If the storage outage goes above 60 seconds, I/Os will fail and the guest OS will likely crash.
  • Virtual machine storage resiliency – VM is paused/suspended until storage access resumes
  • Virtual machine cluster resiliency – 4 minute timeout for cluster services being stopped, with automatic healing. Another resiliency feature for flapping cluster services due to HW issues, and the host will be quarantined and VMs live migrated off after a certain period.

Shared VHDX

  • Going to allow host based (agent free) backups with shared VHDXs
  • Now you can back up cluster as easy as standalone servers
  • Now allows online resizing of shared VHDXs
  • New VHDX type: VHDS

Replica support for hot add of VHDX. When you add a new disk it added it’s into the non-replicated set.

Runtime resize of memory – For Ws2016 and Windows 10, you can increase/decrease the runtime memory while the VM is running.

Hot add/remove of network adapters. Applicable to Generation 2 VMs only.

Rolling cluster upgrade

  • You can now upgrade a 2012 R2 Hyper-V to WS Tech Preview 2 with no downtime, no new hardware, and ability to rollback.

Operational Improvements

  • Production checkpoints – Uses VSS instead of saved state to create checkpoint. Fully supported in production. FINALLY!

PowerShell Direct to Guest OS

ReFS Accelerated VHDX Operations – Instant fixed disk creation and merging of checkpoints. “Instantly” create fixed disks in about 3 seconds of almost any size. Merging checkpoints happens without data being copied.

Changing how we handle VM servicing

  • Integration components are now distributed via Windows update

Evolving Hyper-V Backup: New architecture plus change block tracking is now native

VM Configuration files: VMCX and VMRS. Now a binary format efficient at scale

 

 

Key features of Windows Server 2016

The Virtualization area includes virtualization products and features for the IT professional to design, deploy, and maintain Windows Server.

Better protect credentials, the operating system, and virtual machines (VMs) with just-in-time administration and shielded VMs

Improve datacenter efficiency with virtualization, software-defined storage, and networking

Deliver application innovation with improved security, new modernization capabilities, and cloud-native app development

Windows Server 2016 provides a new Hyper-V-based Shielded Virtual Machine to protect any Generation 2 virtual machine from a compromised fabric.

Windows Server Anti malware is installed and enabled by default in Windows Server 2016, but the user interface for Windows Server Antimalware is not installed. However, Windows Server Antimalware will update anti malware definitions and protect the computer without the user interface. If you need the user interface for Windows Server Antimalware, you can install it after the operating system installation by using the Add Roles and Features Wizard.

Windows Server 2016 system requirements:

Processor

The following are the processor requirements for this server:

Minimum:

  • 1.4 GHz 64-bit processor
  • Compatible with x64 instruction set
  • Supports NX and DEP
  • Supports CMPXCHG16b, LAHF/SAHF, and PrefetchW
  • Supports Second Level Address Translation (EPT or NPT)

RAM

The following are the estimated RAM requirements for this server:

Minimum:

  • 512 MB (2 GB for Server with Desktop Experience installation option)
  • ECC (Error Correcting Code) type or similar technology

Network adapter requirements

Network adapters used with this release should include these features:

Minimum:

  • An Ethernet adapter capable of at least gigabit throughput
  • Compliant with the PCI Express architecture specification.
  • Supports Pre-boot Execution Environment (PXE).

Disk Space

32 GB should be considered minimum space for successful installation. This minimum should allow you to install Windows Server 2016 in Server Core mode, with the Web Services (IIS) server role. A server in Server Core mode is about 4 GB smaller than the same server in Server with a GUI mode.

The system partition will need extra space for any of the following circumstances:

  • If you install the system over a network.
  • Computers with more than 16 GB of RAM will require more disk space for paging, hibernation, and dump files.

Nginx load balancing servers are available for dual machines

If the Web server cluster as a city, then the load balancing server is equivalent to the gates, the importance of self-evident.If the “gates” off, and the outside world is broken, if only a balanced server , When the server fails, it will lead to the entire site can not access.Therefore, we need to more than two servers, to achieve a high transition and high availability.

Dual high availability is generally achieved through the virtual IP (drift IP) method, based on Linux / Unix IP alias technology. Dual high-availability method is divided into two types:

(1): a server plus a hot by the server, under normal circumstances, the main server binding a public network virtual IP, to provide load balancing services, hot standby server is idle, when the main server failure, hot standby The server takes over the public network virtual IP of the main server and provides the load balancing service;

(2): two load balancing servers are active, each binding a public network virtual IP, to provide load balancing services, when one of the failure, the other to take over the failure of the public network virtual server IP.
?1?rmohan.com IP 61.1.1.2
?2?61.1.1.4 IP 61.1.1.2

/sbin/ifconfig eth0:1 61.1.1.2 broadcast 61.1.1.255 netmask 255.255.255.0 up
/sbin/route add -host 61.1.1.2 dev eth0:1
/sbin/arping -I eth0 -c 61.1.1.2 61.1.1.1
(3) rmohan.com?IP? 61.1.1.2? 61.1.1.4? 61.1.1.5
?4? 61.1.1.4 61.1.1.5 IP 61.1.1.2?ping MAC?

/sbin/ifconfig etho:1 61.1.1.2 broadcast 61.1.1.255 netmask 255.255.255.0 up
/sbin/ifconfig add -host 61.1.1.2 dev eth0:1
/sbin/arping -I etho -c 3 -s 61.1.1.2 61.1.1.1
(5) rmohan.com(IP) 61.1.1.1?

VRRP Keepalive ?
?1??rmohan.com DNS IP 61.1.1.2 61.1.1.3
?2? IP? 61.1.1.4
/sbin/ifconfig etho:1 61.1.1.2 broadcast 61.1.1.255 netmask 255.255.255.0 up
/sbin/ifconfig add -host 61.1.1.2 dev eth0:1
/sbin/arping -I etho -c 3 -s 61.1.1.2 61.1.1.1 61.1.1.5
/sbin/ifconfig etho:1 61.1.1.3 broadcast 61.1.1.255 netmask 255.255.255.0 up
/sbin/ifconfig add -host 61.1.1.2 dev eth0:1
/sbin/arping -I etho -c 3 -s 61.1.1.3 61.1.1.1
(3) www,linuxidc.com IP 61.1.1.2 61.1.1.3? DNS
(4)IP 61.1.1.2?ARPing IDC MAC ?
/sbin/ifconfig etho:1 61.1.1.2 broadcast 61.1.1.255 netmask 255.255.255.0 up
/sbin/ifconfig add -host 61.1.1.2 dev eth0:1
/sbin/arping -I etho -c 3 -s 61.1.1.2 61.1.1.1

Nginx?

#!/bin/sh
LANG=C
date=$(date -d “today” +”%Y-%m-%d %H?%M:%S”)

function_bind_vip1()
{
/sbin/ifconfig etho:ha1 61.1.1.2 broadcast 219.232.254.255 netmask 255.255.255.192 up
/sbin/route add -host 61.1.1.2 dev eth0:hal
}
function_bind_vip2()
{

/sbin/ifconfig etho:ha2 61.1.1.3 broadcast 219.232.254.255 netmask 255.255.255.192 up
/sbin/route add -host 61.1.1.2 dev eth0:ha2
}
function_restart_nginx()
{
kill -USR1 ‘cat /usr/local/webserver/nginx/nginx.pid’
}
function_remove_vip1()
{
/sbin/ifconfig etho:ha1 61.1.1.2 broadcast 219.232.254.255 netamsk 255.255.255.192 down
}

function_remove_vip2()
{
/sbin/ifconfig etho:ha2 61.1.1.3 broadcast 219.232.254.255 netamsk 255.255.255.192 down
}
function_vip_arping1()
{
/sbin/ifconfig -I eth0 -c 3 -e 611..1.1.2 61.1.1.1 > /dev/null 2>&1
}
function_vip_arping2()
{
/sbin/ifconfig -I eth0 -c 3 -e 611..1.1.3 61.1.1.1 > /dev/null 2>&1
}

bind_time_vip1=”N”;
bind_time_vip2=”N”;

while true
do
httpcode_arp1=’/usr/bin/cur1 -o /dev/null s -w %{http_code} http://61.1.1.4′
httpcode_arp2=’/usr/bin/cur1 -o /dev/null s -w %{http_code} http://61.1.1.5′

if [x$httpcode_rip1 == “x200″];
then
function_bind_vip1
function_vip_arping1
function_restart_nginx
bind_time_vip1=”Y”
fi
function_vip_arping1
else
if [$bind_time_vip1 == “Y”];
then
function_remote_vip1
bind_time_vip=”N”
fi
fi

if [x$httpcode_arp2 == “x200”];
then
if[ $bind_time_vip2 == “Y”]
then
function_rempve_vip2
bind_time_vip2=”N”
fi
else
if[$bind_time_vip2 == “N”];
then
function_bind_vip2
function_vip_arping2
function_restart_nginx
bind_time_vip2=”Y”
fi
function_vip_arping2
fi

sleep 5
done
Nginx
nohup /bin/sh ./nginx_hal.sh 2>&1 > dev/null &
#!/bin/sh
LANG=C
date=$(date -d “today” +”%Y-%m-%d %H?%M:%S”)

function_bind_vip1()
{
/sbin/ifconfig etho:ha1 61.1.1.3 broadcast 219.232.254.255 netmask 255.255.255.192 up
/sbin/route add -host 61.1.1.3 dev eth0:hal
}
function_bind_vip2()
{

/sbin/ifconfig etho:ha2 61.1.1.2 broadcast 219.232.254.255 netmask 255.255.255.192 up
/sbin/route add -host 61.1.1.2 dev eth0:ha2
}
function_restart_nginx()
{
kill -USR1 ‘cat /usr/local/webserver/nginx/nginx.pid’
}
function_remove_vip1()
{
/sbin/ifconfig etho:ha1 61.1.1.3 broadcast 219.232.254.255 netamsk 255.255.255.192 down
}

function_remove_vip2()
{
/sbin/ifconfig etho:ha2 61.1.1.2 broadcast 219.232.254.255 netamsk 255.255.255.192 down
}
function_vip_arping1()
{
/sbin/ifconfig -I eth0 -c 3 -e 61.1.1.3 61.1.1.1 > /dev/null 2>&1
}
function_vip_arping2()
{
/sbin/ifconfig -I eth0 -c 3 -e 61.1.1.2 61.1.1.1 > /dev/null 2>&1
}

bind_time_vip1=”N”;
bind_time_vip2=”N”;

while true
do
httpcode_arp1=’/usr/bin/cur1 -o /dev/null s -w %{http_code} http://61.1.1.5′
httpcode_arp2=’/usr/bin/cur1 -o /dev/null s -w %{http_code} http://61.1.1.4′

if [x$httpcode_rip1 == “x200″];
then
function_bind_vip1
function_vip_arping1
function_restart_nginx
bind_time_vip1=”Y”
fi
function_vip_arping1
else
if [$bind_time_vip1 == “Y”];
then
function_remote_vip1
bind_time_vip=”N”
fi
fi

if [x$httpcode_arp2 == “x200”];
then
if[ $bind_time_vip2 == “Y”]
then
function_rempve_vip2
bind_time_vip2=”N”
fi
else
if [$bind_time_vip2 == “N”];
then
function_bind_vip2
function_vip_arping2
function_restart_nginx
bind_time_vip2=”Y”
fi
function_vip_arping2
fi

sleep 5
done

nohup /bin/sh ./nginx_ha2.sh 2>&1 > dev/null &

Sudo And apache

a. login as root

b. Edit the sudoers file u uusing visudo command
visudo
Ensure the following is in the file if # is there infront of the line then remove it. Save the file hit esc key the : wq
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL

c. Add users to wheel
usermod -aG wheel test
usermod -aG wheel test1
usermod -aG wheel test2.

8 Fallback

Time Activity Owner
Access rights can be remove again by removing the user from wheel group.
id -nG <username> — This will list all the secondary group of the user
usermod –G group1 group2 <username> — Keyin all the secondary groups except wheel
Or you can directly edit the /etc/group file and remove the username from the wheel group

# cat /etc/group |grep -i wheel
wheel:x:10:root,test
vi /etc/group navigate to the wheel group and remove the user. Example <test>

Configuration of Reverse Proxy

Steps for ssl

FIRST TAKE a backup of apache config folder and cert.

cp rmohan.com.conf rmohan.com.conf_13062017
cp -pR /etc/httpd/conf.d/cert /etc/httpd/conf.d/cert_13062017
Step 2

Unzip the cert.zip
/root/cert
change the file extenstion .txt to intermediate_ca.crt root_ca.crt rmohan.com_com_ee.crt
copy the key file PrivateKey.key /root/cert
Step 3
To combine them, run the following command in terminal:
cd /root/cert/
$ cat intermediate_ca.crt root_ca.crt >> bundle.crt
Step 4

apachectl stop

Step 5

copy /root/cert/bundle.crt to /etc/httpd/conf.d/cert/bundle.crt
cp rmohan.com_com_ee.crt /etc/httpd/conf.d/cert/rmohan.com_com_ee.crt
cp PrivateKey.key /etc/httpd/conf.d/cert/rmohan.com_com_RSA_private.key
SSLCACertificateFile “/etc/httpd/conf.d/cert/bundle.crt”
SSLCertificateFile “/etc/httpd/conf.d/cert/rmohan.com_com_ee.crt”
SSLCertificateKeyFile “/etc/httpd/conf.d/cert/rmohan.com_com_RSA_private.key”
Step 6

apachectl start

we can use 2 methods

First method

How to generate x509 SHA256 hash self-signed certificate using OpenSSL

openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout rmohan.com_com_RSA_private.key -out rmohan.com_com_ee.crt

openssl x509 -noout -text -in rmohan.com_com_ee.crt
second method

Create A Self-Signed SSL Certificate With OpenSSL
openssl req -x509 -sha256 -newkey rsa:2048 -keyout rmohan.com_com_RSA_private.key -out rmohan.com_com_ee.crt -days 1024 -nodes
generating a 2048 bit RSA private key
………………………..+++
…………..+++
writing new private key to ‘rmohan.com_com_RSA_private.key’
—–
You are about to be asked to enter information that will be incorporated
into your rmohan.com_com_RSA_private request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
—–
Country Name (2 letter code) [AU]:SG
State or Province Name (full name) [Some-State]:Singapore
Locality Name (eg, city) []:Singapore
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Singapore Telecommunications Limited
Organizational Unit Name (eg, section) []:Networks
Common Name (e.g. server FQDN or YOUR name) []: smp.smart.singtel.com
Email Address []:admin@singtel.com
openssl req -x509 -sha256 -newkey rsa:2048 -keyout rmohan.com_com_RSA_private.key -out rmohan.com_com_ee.crt -days 1024 -nodes -subj ‘/CN=smp.smart.singtel.com’
Verify sha256 hash function in self-signed x509 digital certificate

openssl x509 -noout -text -in rmohan.com_com_ee.crt
The Nginx front end distributes the method according to $remote_addr
Requirements are as follows:
There are multiple servers under the domain name, is a test for a region, so that a region of the ip user only visit a server, a separate test, if no problem, all updated; problems are less affected,
Timely find the problem to solve the problem;

Solution:
The use of nginx module, in the front-end load balancing on the machine, configure the matching rules;
nginx configuration vhost inside, domain name below the location section, add a code
If $remote_addr match ip, then forwarded to abc_test_server;
server {
listen 80;
server_name rmohan.com;
access_log /dev/null;
error_log /data/logs/error.log;

location / {

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
if ($remote_addr ~ “202.96.134.100”)
{
proxy_pass http://test_server;
break;
}
proxy_pass http://abc_server;
}
}

#abc_test only
upstream test_server {
server 192.168.2.10:80;

}
#rmohan.com
upstream app_server {
server 192.168.2.11:80;
server 192.168.2.12:80;
server 192.168.2.13:80;
}

Will send an email now for the development

HINDU MANTRAS

Hindu God Days

Sunday is dedicated to Lord Surya (Sun God) And Lord Vishnu.

Monday is dedicated to Lord Shiva.

Tuesday is dedicated to Lord Ganesha, Durga, Goddess Kali and Lord Hanuman.

Wednesday is dedicated to Krishna.

Thursday is dedicated to Lord Vishnu and his incarnations.

Friday is dedicated to Mother Goddess – Mahalakshmi and Durga.

Saturday is dedicated to Lord Shani & Lord Hanuman.

Hindu Mantra #1

Gayatri Mantra – Most Powerful Vedic Mantra

Om Bhur Buvaha Svaha
Tat Savitur Varenyam
Bhargo Devasya Dheemahi
Dhiyo Yonaha Prachodayath

Gayatri Mantra English Translation

O Supreme Creator, Thou art the giver of life, the remover of pain and sorrow and the bestower of happiness; O Creator of the Universe, may we receive Thy supreme sin-destroying light; may Thou guide our intellect in the right direction.

Hindu Mantra #2

Mahamritunjay Lord Shiva’s Mantra

Om
Tryambakam Yajamahe
Sugandhim Pushti Vardhanam
Urvarukamiva Bandhanat
Mrytyor Muksheeya Mamritat

Mahamritunjay Mantra English Translation

O Great Three Eyed Lord of All Worlds. You are the sweet fragrance of life.  You are the creator and sustainer.  Free us from the terrible diseases of ignorance, attachment and weakness.  Deliver us from the cycle of birth and death to freedom and ultimate liberation.

Hindu Mantra #3

Vishvani Deva Mantra for Abundance

Om Vishvani Deva
Svitarduritani Para Suva
Yad Bhadram
Tanna a Suva

Vishnavi Deva Mantra English Translation

O Supreme Creator, You are the creator of the entire Universe.  Take away all the bad deeds, bad habits and miseries.  Give us all the good qualities, and blissful and auspicious objects.

Hindu Mantra #4

Lord Ganesha Vakratunda Mahakaya Mantra for Success

Vakratunda Mahakaya
Surya Koti Samaprabha
Nirvighnam Kurumedeva
Shubha Karyeshu Sarvada

Lord Ganesha Mantra English Translation

“O Lord, with large body, curved trunk and the radiance of a million suns.  Please make all my good work free of obstacles, always”.

Hindu Mantra #5

Om Mantra – The Highest Mantra

AUM (OM)

AUM Mantra Meaning

The primodial sound representing Divinity and all of manifestation.
Stay tuned for more mantras and mantra MP3 downloads coming soon.  If you have a favorite Hindu mantra that you would like to share with us, please do so in the comments section below.

Suklam Baradharam Vishnum

Suklam baradharam vishnum
Sasi varnam chathurbhujam
Prasanna vadanam dhyayeth
Sarva vignopa shanthaye
Agajaanana padmaarkam
Gajaanana maharnisham
Anekadantham bhaktaanaam
Ekadantam upaasmahey
Ekadantam upaasmahey

1   INVOCATION

 (Shri Ganesh Vandana Mantra)
Om Suklam Baradharam Vishnum
Shashi Varanam Chatur Bhujam
Prasanna Vadanam Dhyaye
Sarva Vighnopa Shantaye

Salutations to Ganesh who is omnipresent, who wears white robes
Whose face is as bright and cool as the moon and who has 4 arms
Who has a contented face (capable of blessing)
Meditating on him, all obstacles in my life are neutralized.

Suklam (white) Bara (dress) Dharam (wearer) Vishnum (all-pervasive) Shashi (moonbeam, light of the moon) Varanam (color) Chatur (four) Bhujam (arms)  Prasanna (smiling/contented) Vadanam (face) Dhyaye (I meditate) Sarva (all) Vighnopa (obstacles) Shantaye (neturalized, peaceful)

 (Guru Mantra for Sri Chakra Puja, calling in the Masters of Light)
Om Swarupa Nirupana Hetave
Shree Parama Gurave Namaha

I bow to the light, the highest gurus, those in form (living Masters) and those who have moved beyond form (transcended Masters).

Om Swarupa (with form, appearance) Nirupana (without form, searching) Hetave (for the purpose of and with the motivation of offering you the fullness of my soul) Shree (great) Parama (highest) Gurave (to the guru) Namaha (I bow)

(Guru Mantra)
Om Gurur Brahma Gurur Vishnu
Gurur Devo Maheshvara
Guru Saakshat Parambrahma
Tasmai Shree Gurave Namaha

Guru is Brahma, Vishnu and Shiva. He creates, sustains knowledge and destroys the weeds of ignorance. I salute such a Guru.

Gurur Brahma (Brahma is Guru) Gurur Vishnu (Vishnu is Guru) Gurur (Guru) Devo (Lord) Maheshvara (Maha Ishvara = Great Lord, often referring to Shiva) Guru (guru) Saakshat (openly, in sight of, obviously, in the presence of) Parambrahma (great being) Tasmai (give) Shree (radiance, auspiciousness, great) Gurave (to the Guru) Namaha (I bow, offer obeisance, prostrations)

(Hamsa Gayatri – for increasing power of discrimination)
Om Hamsa Hamsaya Vidmahe
Parama Hamsaya Dhimahi
Thannoh Hamsa Prachodayath

Om. Let us meditate on Sri Hamsa Deva, the glorious, pure white divine swan of supreme discrimination. May that great Lord in the form of a swan, who exemplifies paramahamsas, blissful self-realized souls, inspire and illumine our mind and understanding.

Om Hamsa (swan, compassion, peace) Hamsaya Vidmahe (to know, to understand, to discriminate) Parama (great) Hamsaya (peace) Dhimahi (we meditate) Thannoh Hamsa (peace) Prachodayath (enlighten, direct, inspire, guide)

(In the Sri Vidya tradition, Hamsa is released when the sun mandala ‘melts’  the moon mandala. It is like sun and moon coming together in an eclipse, sexual union, or a fertilized seed.  In the Sri Yantra, the five downward pointing triangles (5 shaktis of moon energy, the phases of the moon) and four upward pointing triangles (4 fires of sun and constellations) form the shape in the centre of Shri Cakra.  Pure consciousness is the union of the two, sealed by the bindu.)

(Gayatri)
Om Bhur Bhuva Suvaha
Tat Savitur Varenyam
Bhargo Devasya Dhimahi
Dhiyoyo Nah Prachodayat

On the absolute reality and all its planes of existence, On that finest spiritual light, We meditate. As remover of obstacles May it inspire and enlighten us.

Om Bhur (earth, physical plane) Bhuva (subtle, astral plane) Suvaha (sky, heaven, celestial plane) Tat (essential elements) Savitur (bright, luminous, sun-like, inner light) Varenyam (finest, best) Bhargo (destroyer of obstacles) Devasya (divine, resplendent, shining) Dhimahi (we meditate) Dhiyo (our being of intelligence, intellect, understanding, mind/heart) yo (which) Nah (our) Prachodayat (enlighten, direct, inspire, guide)

Here are my 5 favorite Sanskrit mantras, with their ancient meanings and how we can adopt them into our modern lives:

1) Mantra: OM

Translation: The sound of the universe. It’s the first, original vibration, representing the birth, death and re-birth process.

Modern adaptation: Chanting the sound OM brings us into harmonic resonance with the universe – this is a scientific fact! OM is said to vibrate at 432 Hertz, which is the natural musical pitch of the Universe, as opposed to 440 Hertz, which is the frequency of most modern music.

Decreasing your frequency to coincide with that of the Universe stills the fluctuations of the mind, allowing you to practice yoga through sound. OM is an idyllic way to begin and end a yoga or mediation practice, and also comes in handy when you just need to chill out.

2) Mantra: Om Namah Shivaya

Translation: I bow to Shiva, the supreme deity of transformation who represents the truest, highest self.

Modern adaptation: In the book Eat Pray Love, Elizabeth Gilbert is given this mantra by her Guru, which she lovingly refers to as the “Amazing Grace of Sanskrit.” Her interpretation is, “I honor the divinity within myself.” This is a great mantra to help build self-confidence, reminding us that we are all made up of divine energy and should treat ourselves accordingly.

3) Mantra: Lokah Samastah Sukhino Bhavantu

Translation: May all beings everywhere be happy and free, and may the thoughts, words, and actions of my own life contribute in some way to that happiness and to that freedom for all

Modern adaptation: Most commonly associated with the Jivamukti Yoga School, this mantra is a powerful way to dedicate yourself to living a life of non-harming and being of service to the greater good. This mantra encourages cooperation, compassion and living in harmony with the environment, animals and our fellow human beings.

4) Mantra: Shanti Mantra 
Om Saha Naavavatu
Saha Nau Bhunaktu
Saha Veeryam Karavaavahai
Tejasvi Aavadheetamastu Maa Vidvishaavahai Om

Translation: May the Lord protect and bless us. May he nourish us, giving us strength to work together for the good of humanity. May our learning be brilliant and purposeful. May we never turn against one another.

Modern adaptation: A perfect mantra to start a yoga class, a new day, or even a new business with. It unites the participants and sets a tone of non-competitiveness, unity, and working together towards a common goal.

5) Mantra: Om Gum Ganapatayei Namah

Translation: I bow to the elephant-faced deity [Ganesh] who is capable of removing all obstacles. I pray for blessings and protection.”

Modern adaptation:  In Hindu teachings, Ganesh is known as the god of wisdom and success and the destroyer of obstacles. This is my favorite mantra, which I always draw on when I’m facing a big challenge in life and especially when I’m traveling.

Manage the ‘qmail’ message queue using qmHandle

Manage the ‘qmail’ message queue using qmHandle

Solution

qmHandle, a perl script which gives you greater functionality – allows you to view and manage the ‘qmail’ message queue.

It can be install by excuting the following commands

cd /usr/bin

wget -O – “http://easynews.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.2.0.tar.gz” | tar xzf

Following commands are useful to manage the queue

# List emails by subject wise:

qmHandle -l |awk ‘/Subject/ {print}’|sort | more

#qmHandle -tX ‘string’ ( delete all messages with matching headers, where string to match and X specifies:

‘f’ : Who the message is from,

‘t’ : Who the message is to; or,

‘s’ : What the message’s subject is

#qmHandle -M ( delete all msgs in the queue from MAILER-DAEMON@hostname)

# Forcefully send emails.
qmHandle -a

# List message queues
qmHandle   -l

# delete all messages in the queue
qmHandle   -D

# list local message queue
qmHandle   -L

# list remote message queue
qmHandle   -R

# display message number N
qmHandle   -mN

# delete message number N
qmHandle   -dN

# delete all messages that contain text as Subject
qmHandle   -Stext

# delete all messages that contain text as From email address
qmHandle   -Ftext

# delete all messages that contain text as To email address
qmHandle   -Ttext

God chanting

There are many Shloka and Mantra in Hinduism, almost every Mantra has it’s unique spiritual necessity. I can’t judge which are the top 5 but a few which I regard are –

Shri Ganesha

It is said that a spiritual ceremony is not fulfilled if it’s not started with prayer of Shri Ganesha, so let’s begin with Him.

Gayatri Mantra

One in all Mantra for devotion

Om Bhur Bhuvah Svah
Tat Savitur Varenyam
Bhargo Devasya Dhimahi
Dhiyo Yonah Prachodayat

Mahamrityunjay Mantra (Shiva)

This Mantra is to worship God Shiva, who controls the destruction.

Shri Vishnu

Shri Vishnu, who is the controller, protector of Universe. Shri Rama, Shri Krishna are His incarnation.

 

http://mohan.sg/wp-content/uploads/2017/06/Shantakaram-bhujanashyanam.mp4?_=3

 

Maa Saraswat

Goddess of knowledge, and music. She is the one whose statues are put up in almost every educational and art institutions in India. After all we need Her blessings to focus and excel in our field.

(Taken from Sarasvati Stotram)

http://mohan.sg/wp-content/uploads/2017/06/Ya-Kundendu-Saraswati-Mantra-with-Lyrics-Sanjeevani-Bhelande-Devotional.mp4?_=1

 

 

Maa Laxmi

Goddess of wealth and prosperity, everyone would be ready to please her after all the only thing which is powerful in today’s world is money.

(Taken from Kanakdhara stotram)

Sri Krsna Chaitanya Mahaprabhu, the incarnation of Lord Krsna,

Himself promoted the chanting of the

Hare Krsna Maha-Mantra,

Hare Krsna Hare Krsna Krsna Krsna Hare Hare/Hare Rama Hare Rama Rama Rama Hare Hare.

Lingashtakam
Brahma Muraari Suraarchita Lingam
Nirmala Bhashita Shobhita Lingam
Janma-ja-Dukha Vinaashaka Lingam
Tat Pranamaami Sadaa Shiva Lingam

Devamuni Prava-raarchita Lingam
Kaamadaham Karunaakara Lingam
Raavana Darpa Vinaashaka Lingam
Tat Pranamaami Sada Shiva Lingam

Sarva Sugandha Sulepitha Lingam
Buddhi Vivardhana Kaarana Lingam
Siddha Suraasura Vanditha Lingam
Tat Pranamaami Sadaa Shiva Lingam

Kanaka Mahaamani Bhooshitha Lingam
Phanipathi Veshtitha Shobhitha Lingam
Daksha Suyajna Vinaashaka Lingam
Tat Pranamaami Sadaa Shiva Lingam

Kumkuma Chandana Lepitha Lingam
Pankaja Haara Sushobhitha Lingam
Sanchitha Paapa Vinaashaka Lingam
Tat Pranamaami Sadaa Shiva Lingam

Devaganaarchitha Sevitha Lingam
Bhaavair Bhakti Bhirevacha Lingam
Dinakara Koti Prabhakara Lingam
Tat Pranamaami Sadaa Shiva Lingam

Ashta Dalopari Veshtitha Lingam
Sarva Samudbhava Kaarana Lingam
Ashta Daridra Vinaashaka Lingam
Tat Pranamaami Sadaa Shiva Lingam

Suraguru Suravara Poojitha Lingam
Suravana Pushpa Sadaarchitha Lingam
Parama param Paramaatmaka Lingam
Tat Pranamaami Sadaa Shiva Lingam

Guru Brahma Guru Vishnu Gurudevo Maheshwara: Lyrics & Meaning

 

Lyrics in English

  1. GururBrahma GururVishnu GururDevo Maheshwaraha
  2. Guru Saakshaat ParaBrahma Tasmai Sri Gurave Namaha

Meaning in English

  1. Guru is the Creator (Brahma), Guru is the Preserver(Vishnu), GuruDeva is Destroyer(Maheshwara)
  2. Guru is the absolute (singular) Lord himself, Salutations to that Sri Guru

Om Sahana Vavatu

 

 

Om sahana vavatu
(Om, may God protect both teacher and student)

Saha nau bhunaktu 
(May He nourish us together)

Saha viiryam karavaavahai
(May we work together with great energy)

Tejasvi nau-adhiitam-astu
(May our studying be effective)

Maa vidvissaavahai 
(May there be no hate among us)

Om shanti, shanti, shanti
(Om peace, peace, peace [in three forms – in me, nature and the divine forces])

Mahalakshmi Stotram

Transliteration

Padmasana sthithe devi

Para brahma swaroopini

Paramesi jagan matha

Maha Lakshmi Namosthuthe.

Word by word meaning

Padmasana sthithe devi- goddess who  has the seat of Lotus; Para Brahma swaroopini- embodiment of ultimate consciousness; Paramesi jagan matha-mother (lord) of the worlds; Maha Lakshmi Namosthuthe- salutations to the wealth God Mahalakshmi.

Full meaning in English

Salutations to the wealth Goddess Mahalakshmi who has the seat of Lotus, embodiment of ultimate consciousness, mother (lord) of all the worlds.

Sarvagne Sarva varade

Sarva dushta Bhayamkaree

Sarva dukha hare devi

Maha Lakshmi Namosthuthe.

Sarvagne-Who knows everything (female); Sarva varade- bestower of everything; Sarva dushta Bhayamkaree- fierce for all bad people; Sarva dukha hare devi- annihilator of all sorrows; Maha Lakshmi Namosthuthe- salutations to Goddess Mahalakshmi (Goddess of wealth).

Salutations to Goddess Mahalakshmi (Goddess of wealth), who knows everything, bestower of everything, fierce for all bad people, annihilator of all sorrows.

MAHALAKSHMI ASHTAKAM – LAXMI MANTRA :- VERY POWERFUL MANTRA | SRI LAKSHMI STOTRAM

Namastestu Mahamaye Shree Pithe Sura Poojite
Shanka Chakra Gadha Haste Maha Lakshmi Namoostute

Namastestu Garudarudhe Kolasura Bhayankari
Sarva Papa Hare Devi Maha Lakshmi Namoostute

Maha Devyai Cha Vidmahe Vishnu Patni Cha Dhimahi
Tanno Lakshmi Prachodayat

Sarvajne Sarva Varade Sarva Dushta Bhayankari
Sarva Duhkha Hare Devi Maha Lakshmi Namoostute

Siddhi Buddhi Prade Devi Bhakti Mukti Pradayini
Mantra Moorte Sada Devi Maha Lakshmi Namoostute

Maha Devyai Cha Vidmahe Vishnu Patni Cha Dhimahi
Tanno Lakshmi Prachodayat

Adyanta Rahite Devi Adi Shakti Maheshwari
Yogaje Yoga Sambhute Maha Lakshmi Namoostute

Sthula Sukshme Maha Raudre Maha Shakti Mahodari
Maha Papa Hare Devi Maha Lakshmi Namoostute

Maha Devyai Cha Vidmahe Vishnu Patni Cha Dhimahi
Tanno Lakshmi Prachodayat

Padmasana Sthithe Devi Parabrahma Swaroopini
Parameshi Jagan Mata Maha Lakshmi Namoostute

Shwetambara Dhare Devi Nanalankara Shobhite
Jagasthithe Jaganmata Maha Lakshmi Namoostute

Maha Devyai Cha Vidmahe Vishnu Patni Cha Dhimahi
Tanno Lakshmi Prachodayat

 

Parvati Stotram

Sarva mangala mangallye Shive sarvartha sadhake|

Sharanye tryambeke Gouri Naaraayani namostute||

Word by word meaning

Sarva mangala mangallye-adorned with all auspiciousness; Shiva-auspicious; sarvartha sadhake-fulfiller of both worldly and spiritual wishes; sharanye-the source of refuge; tryambeke-the mother (Lord) of the three worlds; Gouri-the Goddess who is Rays of Light; Naaraayani- the wife of Lord Narayana / Exposure of consciousness; namostute-salutations to you.

Full meaning in English

Salutations to who adorned with all auspiciousness and herself auspicious, fulfiller  of both worldly and spiritual wishes, the source of refuge, the mother (Lord) of the three worlds, the Goddess who is Rays of Light and the wife of Lord Narayana / Exposure of consciousness.

 Devi Sukhtam

Ya Devi Sarvabhuteshu is a chant/sukhtam of Goddess Durga. It is believed that devotees who sing or read this sukhtam will always have the blessings of Goddess Durga. The word ‘Durga’ in sanskrit means a fort or a place which is difficult to overrun. ‘Durgatinashini’ meaning, the one who eliminates sufferings, is another meaning of the name ‘Durga’.

Ya Devi Sarvabhuteshu Vishnu Maayeti Shabdita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Chetanetyaabhi Dheeyate
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Buddhi Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Nidra Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Shuddha Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Chhaya Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Shakti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Trishna Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Shanti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Jaati Rupena Samsthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Lajja Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Shanti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Shraddha Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Kaanti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Lakshmi Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Vrutti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Smruti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah
Ya Devi Sarvabhuteshu Daya Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Tushti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Maatru Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Ya Devi Sarvabhuteshu Bhraanti Rupena Sansthita
Namastasyayi Namastasyayi Namastasyayi Namo Namah

Indriyaanaa Madhishthaatri Bhootaanaam, Chaakhileshu Ya
Bhooteshu Satatam Tasyai, Vyaaptidevyai Namo Namah

Chiti Roopena Yaa Kristnam Yetadhyaapya Sthithaa Jaagat
Namastasyayi Namastasyayi Namastasyayi Namo Namah

https://www.youtube.com/watch?v=ZoxFCt_Y76I

Narayan Gayatri Mantra For Accomplishment of Tasks

“Om Narayanaya Vidmahe, Vasudevaya Dheemahi, Tanno Vishnu Prachodayat.” Meaning: Om, Let me meditate on Lord Narayana, Oh, Lord Vasudeva, give me higher intellect, And let Lord Vishnu illuminate my mind.

Lakshmi Gayatri Mantra For Prosperity

“Om Mahadevyai Vidmahe, Vishnu Patnayai Dheemahi, Tanno Lakshmi Prachodayat.” Meaning: Om, Let me meditate on the great goddess, Oh, wife of Lord Vishnu, give me higher intellect, And let Goddess Lakshmi illuminate my mind.

Durga Gayatri Mantra for Success and Protection

“Om Katyayanaya Vidmahe, Kanya Kumari Dheemahi,Tanno Durga Prachodayat.” Meaning: Om, Let me meditate on the goddess who is daughter of Katyayana, Oh, maiden Goddess, give me higher intellect, And let goddess Durga illuminate my mind

Saraswathi Gayatri Mantra for Success in Education and Career

“Om Vaak-dhevyai Vidmahe, Virinchi Pathniyai Dheemahi, Tanno Vaanee Prachodayat.” Meaning: Om, Let me meditate on the goddess of speech, who is the wife of Lord Brahma, give me greater intellect, And let Goddess Saraswati illuminate my mind.

Hanuman Gayatri Mantra for knowledge and success

“Om Anjaneyaya Vidmahe, Vayuputraya Dheemahi,Tanno Hanumat Prachodayat.” Meaning: Om, Let me meditate on the son of Anjana and the son of the Wind god, give me higher intellect, And let Hanuman illuminate my mind.

 

 

Mantra to Clear the Sin’s of 7 Generations – 7 

 

If we Chant this Mantra in a Ancient Shiva Temple, Ancestors committed Sin’s for nearly 7 Generations will be Cleared.
Om Sri Soma Nadeshwara Namaha.
Om Sri Mallikarjunesvaraya Namaha.
Om sri maha kalesvaraya namaha.
Om Sri Ongaram Malaysvaraya Namaha.
Om Sri Vaidya Bhima Sankareswaraya Namaha.
Om Sri Rameshwara Namaha.
Om Sri Nageswaraya Namaha.
Om Sri Visvesvaraya Namaha.
Om Sri Triyambakesvaraya Namaha.
Om Sri Kedarisvaraya Namaha.
Om Sri Kusrunesvaraya Namaha.

 

 

Hadoop 2.6.4 distributed cluster environment is built on the actual cluster .

Hadoop 2.6.4 distributed cluster environment is built on the actual cluster .

Cluster preparation

There are five machines that have changed the machine name for master, slaver1, slaver2, slaver3, slaver4, and set the face password ssh login. You can refer to here http://www.linuxidc.com/Linux/2016-02/128149.htm

Machine name Ip
Master 192.168.1.1
Slaver1 192.168.1.2
Slaver2 192.168.1.3
Slaver3 192.168.1.4
Slaver4 192.168.1.5
Install the JDK

CentOS 7 is openJDK by default

Uninstall the openJDK under CentOS 7 and install Sun JDK1.7

View the openJDK installation path

rpm -qa | grep java

Uninstall openJDK

rpm -e –nodeps java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64
rpm -e –nodeps java-1.8.0-openjdk-devel-1.8.0.60-2.b27.el7_1.x86_64
rpm -e –nodeps java-1.6.0-openjdk-1.6.0.36-1.13.8.1.el7_1.x86_64
rpm -e –nodeps java-1.6.0-openjdk-devel-1.6.0.36-1.13.8.1.el7_1.x86_64

Install Sun JDK1.7

Download from the official website jdk-7u80-linux-x64.rpm, upload to master

Install Sun JDK1.7

rpm -ivh jdk-7u80-linux-x64.rpm

Modify environment variables

In /etc/profile add in

export JAVA_HOME=/usr/java/jdk1.7.0_80
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

source /etc/profile

Install Hadoop 2.6.4

Download, extract

Hadoop 2.6.4 downloaded from the official website and decompress on the master
extraction path of their choice, here is my decompression in

/root/workspace/software/hadoop-2.6.4

Add environment variable

In /etc/profileadd in

export HADOOP_HOME=/root/workspace/software/hadoop-2.6.4/
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
Modify the Hadoop configuration file

Hadoop-env.sh

In the hadoop decompression path below, / etc / hadoop / hadoop-env.sh add the following two lines

export JAVA_HOME=/usr/java/jdk1.7.0_80
export HADOOP_PREFIX=/root/workspace/software/hadoop-2.6.4
Core-site.xml

Under the hadoop decompression path, add the following to / etc / hadoop / core-site.xml

fs.defaultFS
hdfs://master:9000/
hadoop.tmp.dir
/root/workspace/software/hadoop-2.6.4/tmp

Hdfs-site.xml

In the hadoop decompression path below, / etc / hadoop / hdfs-site.xml add the following

dfs.replication
3

Set here to 3, indicating that the data has 3 copies.

Mapred-site.xml

Under the hadoop decompression path, add the following to / etc / hadoop / mapred-site.xml

mapreduce.framework.name
yarn

Yarn-env.sh

In the hadoop decompression path below, / etc / hadoop / yarn-env.sh increase below, increase the Java-HOME configuration

export JAVA_HOME=/usr/java/jdk1.7.0_80
Yarn-site.xml

Under the hadoop decompression path, add the following to / etc / hadoop / yarn-site.xml

yarn.nodemanager.aux-services
mapreduce_shuffle
yarn.resourcemanager.hostname
master
The address of the applications manager interface in the RM.
Yarn.resourcemanager.address
master:18040
The address of the scheduler interface.
Yarn.resourcemanager.scheduler.address
master:18030
The address of the RM web application.
Yarn.resourcemanager.webapp.address
master:18088
The address of the resource tracker interface.
Yarn.resourcemanager.resource-tracker.address
master:8025

Add some of the port number, easy to remotely from the browser to view the cluster situation, it is recommended to add in accordance with this.

Slaves

Under the hadoop decompression path, add the following to / etc / hadoop / slaves

master
slaver1
slaver2
slaver3
slaver4

Deploy slaver1-slaver4

In accordance with the above process, the slaver1-slaver4 on the environment variables added, and then directly

scp -r /Hadoop2.6.4 root@slaverX:/root/workspace/software/
X is 1 – 4, copied to slaver1 – slaver4, respectively

Start hadoop cluster

Format the file system

hdfs namenode -format
Start NameNode and DateNode

/root/workspace/software/hadoop-2.6.4/sbin, run

start-dfs.sh
Use the jps command to view the Java process on the master

[root@master hadoop]# jps
27130 DataNode
27927 NameNode
12379 Jps
27422 SecondaryNameNode
[root@master hadoop]#
Jps command to view the Java processes on slaver1 – slaver4, respectively

[root@slaver1 hadoop]# jps
6130 DataNode
1264 Jps
View NameNode and NameNode information

Browser input

IP:50070/dfshealth.html#tab-datanode
IP is the IP of your cluster

Start the ResourceManager and NodeManager

Run start-yarn.sh, jps view process is as follows:

[root@master hadoop]# jps
27130 DataNode
28777 ResourceManager
27927 NameNode
12379 Jps
28916 NodeManager
27422 SecondaryNameNode
Switch to slaver1-slaver4, jps view process

[root@slaver1 hadoop]# jps
27130 DataNode
12379 Jps
28916 NodeManager
Succeeded

Hadoop cluster has already started.

MongoDB DB backup

MongoDB DB backup

[root@rmohan scripts]# cat mongodb_backup.sh
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin:/usr/local/mongodb/bin:/usr/local/mongodb/bin
export PATH
export LANG=en_US.utf8

Dbip=”192.168.1.10″
Dport=”30000″
Datetime=$(date +%Y-%m-%d_%H_%M_%S)
Logfile=”/backup/mongodb/mongodbbak_10010/backmongo.log”
Dblist=”$(echo ‘show dbs’|/usr/local/mongodb/bin/mongo –host ${Dbip} –port ${Dport} |egrep -v “MongoDB|connecting|bye”|awk ‘{print$1}’)”

echo -e “=======start for database backup `date +%F’ ‘%T’ ‘%u`=======\n” >>$Logfile
backdbcmd(){
echo “$(date) backup $dbname”
/usr/local/mongodb/bin/mongodump –host ${Dbip} –port ${Dport} –db ${dbname} –out /backup/mongodb/mongodbbak_10010/${Datetime}
echo -e “$(date) Done.\n”
}

for dbname in $Dblist
do
echo -e “——–$dbname——–\n” >>$Logfile
backdbcmd >>$Logfile 2>&1
done

/usr/local/mongodb/bin/mongorestore –port=30000 –dir=/home/mongodb/2016-07-28_00_12_05 –writeConcern='{w:0,wtimeout:200}’ –numParallelCollections=8 –numInsertionWorkersPerCollection=10 –stopOnError -v –drop