LDAP PKGSRC Cutover

# Compress ldap directory on WEB01.PROD
tar -C /home/webadmin/pkg/var/openldap -czvf /tmp/kimconnect-com.gz kimconnect-com
chmod 777 /tmp/kimconnect-com.gz
 
# Make a backup of ldap files
cd /home/webadmin/pkg/var/openldap
dateString=$(date +”%m_%d_%Y”)
mv kimconnect-com kimconnect-com_$dateString
 
# Pull files from WEB01.PROD while logon to WEB02.PROD as webadmin
scp -P{port-number} webadmin@WEB01:/tmp/kimconnect-com.gz /home/webadmin/pkg/var/openldap
 
# Untar
cd /home/webadmin/pkg/var/openldap && tar xvzf kimconnect-com.gz