#! /Bin/bash
# Function:
# Backup user_data
# History:
# Copyright @ 2011 zhaohaihua
Export extfile = 'date' + % Y % m % d % H % m''
Export bak_dir =/home/Oracle/data_bak
Su-oracle-c "exp user01/user01 file = $ bak_dir/user01. $ extfile. dmp compress = y full = y log = n"
Cd $ bak_dir
Tar-zcvf user01.20.extfile.dmp.tar.gz user01. $ extfile. dmp
Scp $ bak_dir/user01. $ extfile. dmp. * root@192.168.0.23:/home/oracle/bak/
Rm-rf/home/oracle/data_bak/user01 .*
#00 00 ***/bin/bash/home/bak. sh
Ssh password-less access
1. Generate the key first
# Cd/root/. ssh/
# Ssh-keygen-t dsa
Then press enter until you get it in the. ssh directory.
Id_sda? Id_sda.pub files
2. # cp id_sda.pub authorized_keys
3. Copy the. ssh folder to overwrite the. ssh directory between nodes.
# Scp-r/root/. ssh node1
4. preacquisition
Set the IP addresses of all nodes to regular static addresses, and then modify the/etc/hosts file for each node, as shown below:
172.16.20.100 node0
In this way, nodes can be accessed by node0 for short, rather than by lengthy IP addresses.