wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


start

SHIFT-WIKI - Sjoerd Hooft's InFormation Technology

This WIKI is my personal documentation blog. Please enjoy it and feel free to reach out through blue sky if you have a question, remark, improvement or observation. See below for the latest additions, or use the search or tags to browse for content.


Create A SSL Port Tunnel

Summary: Create a SSL Port tunnel with Putty
Date: Around 2011
Refactor: 4 January 2025: Checked links and formatting.

  • Target: Access a SFTP Server which is only accessible by a production box.
  • Production Box: AIX with SSH/SSL capabilities, login is possible.
  • SFTP Server: Login credentials are available.
  • Used Tools: Putty for the tunnel, WinSCP to connect

→ Read more...

2025/06/01 11:59

Setup a Point To Site VPN to Azure

Summary: How to Setup a Point To Site VPN to Azure.
Date: Around 2018
Refactor: 22 March 2025: Checked links and formatting.

Setting up a Point2Site VPN is something you normally would consider for people on the road or if you do not have many users. This setup will just connect my computer to my Azure tenant and is a follow-up on these previous articles: Getting Started With Azure and Active Directory Domain Controller in Azure. So far I haven't done anything else in the environment so everything will still be done from scratch. To connect my computer through a VPN to the Azure tenant we'll need a couple of things and steps to go through:

  • We'll need Certificate Services because we need a root certificate as well as a client certificate
  • We need to enable the tenant to allow Point To Site VPNs by configuring a subnet and gateway
  • Then we need to install the VPN client software

→ Read more...

2025/06/01 11:59

Script: Bash: PFILE Backup

Summary: A script for a oracle pfile backup restore.
Date: Around 2013
Refactor: 8 March 2025: Checked links and formatting.

You need a pfile when restoring the Oracle RMAN Backup.

#!/bin/bash
# set -x
 
### Script Variables
WHATAMI=`basename $0`
BASEDIR=`dirname $0`
 
### Oracle Variables
export ORACLE_SID=<oraclesid>
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/10.2
 
 
### Offsitecopy Variables
. "$BASEDIR/mail.txt"
. "$BASEDIR/offsitecopy.func2"
BACKUPDIR=/var/backup/oracle/pfile
HOSTNAME=`hostname`
HOSTNAME_SHORT=`hostname -s`
LOGFILE="$BACKUPDIR/log.txt"
TOUSER="repluser"
TOHOST="syncserver.company.local"
TODIR="/srv/syncdata/Oracle/${HOSTNAME_SHORT}_${ORACLE_SID}/pfile"
BACKUPFILE="$BACKUPDIR/${HOSTNAME_SHORT}_${ORACLE_SID}-pfile_`date +%Y%m%d%H%M`.pfile"
DOCOPY="1"
 
mailFunction() {
   if [ "$1" == "SUCCESS" ]; then
      cat $LOGFILE | mail -s "Check PFILE Backup, not copied and not checked!" $MAILTOFAIL
   fi
}
 
copyFunction() {
   if [ "$DOCOPY" == "1" ]; then
      offsitecopy "${BACKUPFILE}" "$TOUSER" "$TOHOST" "$TODIR" "$LOGFILE" "$WHATAMI" "$HOSTNAME" "$MAILTOSUCCESS" "$MAILTOFAIL"
   else
      echo
      echo "Copy to offsite location is not enabled."
      echo "Modify the script under Offsitecopy Variables to enable offsitecopy"
      echo
      mailFunction SUCCESS
   fi
}
 
# NOTE: Output of command is always succesful because of the echo!!! Always check $LOGFILE
createPfile() {
   echo "Starting pfile backup..." > $LOGFILE
   echo "create pfile='$BACKUPFILE' from spfile;" | $ORACLE_HOME/bin/sqlplus -S "/ as sysdba" >> $LOGFILE
   echo "Pfile backup done." >> $LOGFILE
}
 
createPfile
copyFunction
 
echo
echo "INFO - PFILE backup finished"
echo

As you can see, there is an external reference to offsitecopy and mail.txt. Both are described in Bash: Function: Offsitecopy.

→ Read more...

2025/06/01 11:59

All Pages

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W

2025/06/01 11:59

<< Newer entries | Older entries >>

This wiki has been made possible by:

start.txt · Last modified: by sjoerd