Friday, July 27, 2012

Backup Oracle on SLES using VMware Snapshot

/usr/sbin/pre-freeze-script
#!/bin/bash
/bin/su - oracle -c "echo $(date) >> /u01/app/oracle/snapshot.log"
/bin/su - oracle -c "/u01/app/oracle/product/11.2.0/xe/bin/sqlplus /nolog @/u01/app/oracle/suspend.sql >> /u01/app/oracle/snapshot.log"

/usr/sbin/post-thaw-script

#!/bin/bash
/bin/su - oracle -c "echo $(date) >> /u01/app/oracle/snapshot.log"/bin/su - oracle -c "/u01/app/oracle/product/11.2.0/xe/bin/sqlplus /nolog @/u01/app/oracle/resume.sql >> /u01/app/oracle/snapshot.log"

/u01/app/oracle/suspend.sql
connect / as sysdba;
ALTER SYSTEM SUSPEND;
exit;

/u01/app/oracle/resume.sql
connect / as sysdba;
ALTER SYSTEM RESUME;
exit;
/u01/app/oracle/.bash_profile
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export PATH=$ORACLE_HOME/bin:$PATH



Thursday, July 26, 2012

Oracle Enable ArchiveLog and change processes

connect / as sysdba;

shutdown;
startup mount

alter system set processes=150 scope=spfile;
alter database archivelog;

alter database open;

Backup Domino on Linux using VDR or Veeam

1. Install VMware-Tools (I think it should be installed but unlucky still a lots out there do not know how to install on Linux)
2. Create a script /usr/sbin/pre-freeze-script

#!/bin/bash

# Just a log with date, you can remove it
echo $(date) >> /var/log/snapshot.log

# Assume Domino Service is installded and started by user "domino", we drop all connection and flush all database cache
/bin/su - domino -c "cd /local/notesdata/;/opt/ibm/lotus/bin/server -c \"drop all\";/opt/ibm/lotus/bin/server -c \"dbcache flush\""


# Some forks saying we should do a sync before backup, run it with no harm...

/bin/sync

3. chmod 755 /usr/sbin/pre-freeze-script


4. In VMware vSphere, take a snapshot of your Domino Server, uncheck "Snapshot the virtual machine's memory" as it will not run the script is memory is taken and check "Quiesce guest file system".


Check if /var/log/snapshot.log has date recorded and better connect your Domino Console and see if the connection has been dropped when taking snapshot (to prove the script has been run correctly).

Wednesday, July 25, 2012

Remove logwatch mail on RHEL with Domino

If you don't really care and want to use logwatch, easiest way, remove /etc/cron.daily/0logwatch
OR
If you care about logwatch, go  /usr/share/logwatch/default.conf/logwatch.conf and config those mail settings

Monday, July 23, 2012

PaloAlto Firewall SSL VPN with Client Certificate Verification

1. Import CA Certificate into PaltoAlto
2. Create Client Certificate Profile
Select CA Certificate
Input OCSP URL E.g. https://IP:PORT/ca/ocsp
Check use OCSP
3. Select that Client Certificate Profile in SSL VPN Tunnel Setting
4. Commit and Test

Monday, July 16, 2012

Setting UCS Jumbo Frame with VMware

Uplink Switch
set system mtu jumbo 9000

UCS
Set System Class QoS "Best Effort" mtu 9216
Set and Enable your preferred System Class QoS mtu 9216
Create QoS on your preferred System Class QoS
Apply on vNic with mtu 9000

VMware
set virtual switch mtu 9000
set virtual port mtu 9000
set vmotion kernel port mtu 9000

Tuesday, July 3, 2012

Recovery Domino Directory names.nsf from corrupt


nfixup names.nsf -f -j -v -l
ncompact names.nsf -c -i
nconvert -d names.nsf * pubnames.ntf
nupdall names.nsf -RX