FacebookTwitterFlipboardWhatsAppShare

After download all files i just want to rename the files to presentation titles. I search for a rename software but the problem was not about software. The problem was how to get the relationship with the file and the presentation name.

I open every pdf file and get the presentation title and create the relationship. After that a small java program rename all files on a folder.

The file bellow has the relationship

renamer.txt

The java code bellow rename the files on the folder. Just put the reanamer.txt and Rename.jar on the same folder of the dowloaded files and run java -jar Rename.jar

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Rename {

    public static void main(String[] args) throws FileNotFoundException {
        BufferedReader br = null;
        String line = "";
        String cvsSplitBy = ",";
        String csvFile = "renamer.txt";
        br = new BufferedReader(new FileReader(csvFile));

        try {
            while ((line = br.readLine()) != null) {
                    
                    String[] oldName = line.split(cvsSplitBy);
                    
                    System.out.println(oldName[0]);
                    System.out.println(oldName[1]);
                    
                    File oldfile = new File (oldName[0]+".pdf");
                    File newfile = new File (oldName[1]+".pdf");
                    if (oldfile.renameTo(newfile)) {
                        System.out.println("Rename sucessfull");
                    }
                    
                }
        } catch (IOException e) {
            
            e.printStackTrace();
        }

        
            try {
                br.close();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }        
    }

}

Rename.jar

 

Uncategorized

Obs: Go to this link for a smarter way to download the presentations :-)

 

Several sessions has the presentation file for download.

I created a file above with links to presentations files i found (51 files). I will update it next week.

To download all files do the steps bellow.

1 – Install DownThemAll! add-on for Firefox. After installing restart Firefox.

2 – Login on the connect2016 site. Go to Firefox menu and select Tools – DownThemAll! Tools – Manager… Right-click inside DownThemAll! screen.

3 – Select context menu Advanced – Import from file.

4 – On Import downloads dialog window make sure you select Text Files in the dropdown list.

5 – Point to the text file connect2016 that contains the URLs. Click Open button.

6 – On Make your selection dialog window, DownThemAll! will load each link it finds in the text file allowing you to select which ones you want to download and the folder where you want the files to be saved as well.

7 – Make your selections, click Start button.

 

Connections

On my connections test server i installed everything in one machine.

The  home directory for db2inst1 user ends the file space

The databases and all containers are under the default of /home/db2inst1. So we can use db2relocatedb to move them.

First i tested this here with the sample database, and it worked. Your configuration file should look like the following (This is for FILES DB, you will have to change at least the DB_NAME for the others):

DB_NAME=Files
DB_PATH=/home/db2inst1,/dados
INSTANCE=db2inst1
STORAGE_PATH=/home/db2inst1,/dados/db2inst1

/* NOTE that I am assuming that all databases are using the default storage path like the FILES DB is. If not, you will need to modify this. You can verify by running for each database:

db2 “SELECT VARCHAR(STORAGE_GROUP_NAME, 30) AS STOGROUP, VARCHAR(DB_STORAGE_PATH, 40) AS STORAGE_PATH FROM TABLE(ADMIN_GET_STORAGE_PATHS(”,-1)) AS T”

So if the output shows /home/db2inst1, then you can use my example above. Otherwise you will need to use the actual value for te original location. */

LOG_DIR=oldDirPath,newDirPath

/* For the log directory, with the FILES DB, you are suing the default of /home/db2inst1/etc etc, so you do not need to set this. If the others are the same, then you do not need to set them either. Otherwise you have to.

FAILARCHIVE_PATH=newDirPath
LOGARCHMETH1=newDirPath
LOGARCHMETH2=newDirPath
MIRRORLOG_PATH=newDirPath
OVERFLOWLOG_PATH=newDirPath

/* For the above, for the FILES database, you are not using any of them so you can ignore these. For the other databases, if you are not using them OR you are using the default of /home/db2inst1, then you can ignore them.

So ultimately for the FILES database, you would have:

DB_NAME=Files
DB_PATH=/home/db2inst1,/dados
INSTANCE=db2inst1
STORAGE_PATH=/home/db2inst1,/dados/db2inst1

If the other databases are just like files (regarding storage path and log directory), then you will have the same thing except for the database name.

Then perform the following steps:

1. Stop the Connections server and terminate all connections and deactivate the databases – “db2 deactivate db <dbname>”.
2. Stop the instance – “db2stop”.
3. MOVE (do NOT copy!!) the database directory to the new location (VERY IMPORTANT TO MAKE SURE INSTANCE IS STOPPED!!):

mv /home/db2inst1/db2inst1 /dados

Once done you should have /dados/db2inst1/<all the database stuff>. Since all databases are under this directory, you only need to execute the one move command.

4. Ensure that the owner/group/permissions for /dados/db2inst1 are correct (should match old location).
5. Then you would execute the db2relocatedb command FOR EACH database. DO NOT START THE INSTANCE UNTIL ALL ARE DONE!!.

db2relocatedb -f <config file name>

You should see the following output:

[db2inst1@connections ~]$ /home/db2inst1/sqllib/bin/db2relocatedb -f blogs.cfg
Files and control structures were changed successfully.
Database was catalogued successfully.
6. Once the above has been done for each database, you should be able to start the instance and then connect to the databases.

Thanks to IBM IM Support.

Connections DB2

This is a video series about the new features of WebSphere Portal 8.5 CF08

Creating a site with Site Builder: Administrator

Creating a site with Site Builder: Content Authors

Exploring the site toolbar and site manager

Creating pages

Editing options in the site manager

Uncategorized

This tool allows Help Desk / Support personnel to generate automated emails to a user having difficulty with a Calendar event.  The email contains a button for the receiving user to click which will allow them to select the problematic document, automatically extract and email the requested data back to the requestor (or a mail-in database).

See this technote from IBM

Uncategorized

For the first time i was nominated IBM Champion for Middleware.  Since the beginning of the program (2011) i was nominated  IBM Champion.

Thanks IBM.   New category new opportunities

Screenshot2014-12-0221.53.15

The list of all IBM Champions for Middleware class 2016

Uncategorized

I was researching Linux and its development. I found the link to the video Revolution OS that shows how beautiful is the story behind the movement of free software and open source. They changed the world.

Linux

In this post i will describe the steps i follow to backup my IBM Connections 5.0.   The TSM Server and Connections Serve are using Linux.

 Install TSM Client on the IBM Connections Server.

Install gskcrypt and gskssl. Normally, these libraries can be found in an archive with the TSM Client.

#rpm -ivh gskcrypt64-8.0.x.x.linux.x86_64.rpm
#rpm -ivh gskssl64-8.0.x.x.linux.x86_64.rpm
# yum localinstall TIVsm-API64.x86_64.rpm
# yum localinstall TIVsm-BA.x86_64.rpm

TSM Client Configuration.

Add the TSM client service to autostart :

# chkconfig --add dsmcad
# chkconfig dsmcad on

Create the configuration files dsm.sys and dsm.opt.

Copy the files from samples /opt/tivoli/tsm/client/ba/bin/

# cp dsm.opt.smp dsm.opt
# cp dsm.sys.smp dsm.sys

I create some Exclude rules to not backup log files and temporary folders.
All other files of the Connections will be included on the baackup.

The content of my dsm.sys :

Obs: Server name and ip address must match your environment

SErvername  <your tsm server name>
   COMMMethod         TCPip
   TCPPort            1500
   Exclude /.../*.log
   Exclude /.../log/.../*
   Exclude /.../tmp/.../*
   Exclude /.../wstemp/.../*
   Exclude /.../javacore*
   Exclude /.../logs/.../*
   SCHEDLOGRETENTION 7 D
   MAXCMDRETRIES 4
   COMPRESSION YES
   MANAGEDSERVICES WEBCLIENT SCHEDULE
   QUERYSCHEDPERIOD 1
   COMMMethod         TCPip
   TCPPort            1500
   TCPServeraddress   <your tsm server ip address>
   PASSWORDACCESS GENERATE
   NODename Connections

Content of dsm.opt:

SErvername <your tsm server name>

TSM  Policy Domain

Tivoli Storage Manager Policy Management are the important set of rules or instructions to TSM server & database for managing client backups in the server storage. Policies are rules that you set at the IBM Tivoli Storage Manager server to help you manage client data. Policies control how and when client data is stored, how long to be stored and when to expire.
For example:

How and when files are backed up and archived to server storage
How space-managed files are migrated to server storage

The number of copies of a file and the length of time copies are kept in server storage

I created a FILEDOMAIN policy for filesystem backup on my TSM Server with the following commands on TSM console:

define domain FILESDOMAIN
       define policyset FILESDOMAIN FILESPOLICY
       define mgmtclass FILESDOMAIN FILESPOLICY FILESMGMTCLASS
       assign defmgmtclass FILESDOMAIN FILESPOLICY FILESMGMTCLASS
       define copygroup FILESDOMAIN FILESPOLICY FILESMGMTCLASS type=backup dest=backuppool VEREXISTS=5 VERDEL=1 RETEXTRA=3 RETONLY=5
       define copygroup FILESDOMAIN FILESPOLICY FILESMGMTCLASS type=archive dest=archivepool RETVER=8
       validate policyset FILESDOMAIN FILESPOLICY
       activate policyset FILESDOMAIN FILESPOLICY

File retention is key for this configuration.  See more information about this topic at: https://www-304.ibm.com/support/docview.wss?uid=swg21224145

Register the TSM Client

Perform the following steps in the TSM Server’s console, if you haven’t registered the new node yet.

register node CONNECTIONS <password> domain=FILESDOMAIN

Create a client schedule and associate the node

TSM Central scheduling helps automate backup, archive, automatic client updates, and other processes. You can schedule IBM Tivoli Storage Manager operations by using an external scheduler or the built-in Tivoli Storage Manager scheduler. You can configure scheduling through Administrative command line or through TSM Operations Center (GUI).

define schedule FILESDOMAIN WEEKDAY_INCREMENTAL action=Incremental options=-subdir=yes objects='"/opt/ibm/*" "/var/ibm/InstallationManager/*"' DAYofweek=WEEKDay startdate=today starttime=02:30 DURation=3 DURUnits=Minutes

Associate the client with the scheduler

define assoc FILESDOMAIN  WEEKDAY_INCREMENTAL CONNECTIONS

 

Verify the setup

Execute the commands bellow to finish the client configuration and verify the session with server and client schedule:

# dsmc query sessionThe output will be like this

IBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 7, Release 1, Level 2.0
  Client date/time: 01/11/2016 11:07:26
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.Node Name: CONNECTIONS
Session established with server IMPLET: Linux/x86_64
  Server Version 7, Release 1, Level 1.100
  Server date/time: 01/11/2016 11:09:15  Last access: 01/11/2016 10:27:50TSM Server Connection InformationHome Server Name........: <tsm server name>
Server Type.............: Linux/x86_64
Archive Retain Protect..: "No"
Server Version..........: Ver. 7, Rel. 1, Lev. 1.100
Last Access Date........: 01/11/2016 10:27:50
Delete Backup Files.....: "Yes"
Delete Archive Files....: "Yes"
Deduplication...........: "Server Only"Node Name...............: CONNECTIONS
User Name...............: root# dsmc query schedIBM Tivoli Storage Manager
Command Line Backup-Archive Client Interface
  Client Version 7, Release 1, Level 2.0
  Client date/time: 01/11/2016 11:39:13
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.Node Name: CONNECTIONS
Session established with server <tsm server name>: Linux/x86_64
  Server Version 7, Release 1, Level 1.100
  Server date/time: 01/11/2016 11:41:03  Last access: 01/11/2016 11:27:52    Schedule Name: WEEKDAY_INCREMENTAL
      Description:
   Schedule Style: Classic
           Action: Incremental
          Options: -subdir=yes
          Objects: "/opt/ibm/*" "/var/ibm/InstallationManager/*"
         Priority: 5
   Next Execution: 14 Hours and 49 Minutes
         Duration: 3 Minutes
           Period: 1 Day  
      Day of Week: Weekday
            Month:
     Day of Month:
    Week of Month:
           Expire: Never

Configure TSM to backup DB2

The Tivoli Storage Manager application programming interface (API) provides a library of functions that allow independent software applications and custom-built applications to back up and archive their data to a Tivoli Storage Manager server. The DB2 DBMS also uses the Tivoli Storage Manager API for backup and restore operations.DB2 provides its own backup utility that can be used to back up data at the table space level or the database level. If you set up this utility to use Tivoli Storage Manager as the backup media, DB2 communicates with the Tivoli Storage Manager API for backup and restore operations. Thus, both the Tivoli Storage Manager API client and backup-archive client work together to provide full data protection for your DB2 environment. The API client and the backup-archive client can run simultaneously on the same DB2 server. The Tivoli Storage Manager server considers them separate clients.

Setup TSM API on DB2 machine

Install gskcrypt and gskssland the TSM API

#rpm -ivh gskcrypt64-8.0.x.x.linux.x86_64.rpm
#rpm -ivh gskssl64-8.0.x.x.linux.x86_64.rpm
#yum localinstall TIVsm-API64.x86_64.rpm

Set the environment variablesSet the following DSMI environment variables in either the operating system shell or the
/home/instance_home_dir/sqllib/userprofile file.
DSMI_DIR
DSMI_CONFIG
DSMI_LOG

Important: The DB2 DBMS reads these environment variables during the DB2 instance startup. If you change the variables, you must restart the
DB2 instance for the changes to take effect.

DSMI_DIR
This variable points to the API installation directory. The dsmtca file, the dsm.sys file, and the language files must be in the directory pointed to by the DSMI_DIR environment variable. Setting the DSMI_DIR variable is optional. If it is not specified, the default directory is /usr/tivoli/tsm/client/api/bin64

DSMI_CONFIG
This variable points to the fully qualified path and file name of the Tivoli Storage Manager dsm.opt client options file. This file contains the name of the server to be used.

DSMI_LOG
This variable points to the directory path where the error log file, dsierror.log, is to be created.

export DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
export DSMI_LOG=/home/db2inst1
export DSMI_DIR=/usr/tivoli/tsm/client/api/bin64

Configure the dsm.sys and dsm.opt and put these files on /usr/tivoli/tsm/client/bin64 and change these files permissions to 775.

You can use the sample from step 3 just exclude the Exlude entries and change the node name.

Log off and log in again as an instance user and run the .profile file.

Restart  the db2 instance.

Register a new Policy Domain for DB2

define domain dbdomain
  define policyset dbdomain dbpolicy
define mgmtclass dbdomain dbpolicy dbmgmtclass
assign defmgmtclass dbdomain dbpolicy dbmgmtclass

define copygroup dbdomain dbpolicy dbmgmtclass type=backup dest=backuppool VEREXISTS=1 VERDEL=0 RETEXTRA=0 RETONLY=0
     validate policyset dbdomain dbpolicy
activate policyset dbdomain dbpolicy

Register the DB2 node

On the TSM Console register the new node:

register node ConnectionsDb2 <password> domain=DBDOMAIN

Set the API user

To access the Tivoli Storage Manager server, client users (called nodes) must have a password to access the server. The DB2 dsmapipw program uses the Tivoli Storage Manager API to create the encrypted password file. The DB2 application includes the dsmapipw utility, which is installed in the /home/instance_home_dir/sqllib/adsm directory.Log in as root user to run the dsmapipw utility. Before you run dsmapipw, you must set the DSMI environment variables similar to that on the DB2 instance.

     # ./dsmapipw

Db2 online backup

On the TSM Server set the following to avoid errors. For detais see this TN http://www-01.ibm.com/support/docview.wss?uid=swg21686874

setopt BackupInitiationRoot no

Update the dabases configuration:

db2 update db cfg using LOGARCHMETH1 TSM (for all IBM Connections databases)

Schedule DB2 backup

Schedule the backup for DB2 databases are different from the filesystem. There are some paths to do the same thing.
I choose a script with cron.Create a file named backup.ksh with the following linesdb2 backup db fnos online use TSM

db2 backup db opnact online use TSM
db2 backup db cognos online use TSM
db2 backup db projexec online use TSM
db2 backup db metrics online use TSM
db2 backup db sncomm online use TSM
db2 backup db wikis online use TSM
db2 backup db forum online use TSM
db2 backup db fngcd online use TSM
db2 backup db homepage online use TSM
db2 backup db dogear online use TSM
db2 backup db peopledb online use TSM
db2 backup db mobile online use TSM
db2 backup db files online use TSM
db2 backup db blogs online use TSM

Add the following entry on the crontab of the root user using crontab -e

00 3 * * 1-6 su - db2inst1 -c "/home/db2inst1/backup.ksh >> /home/db2inst1/fullbackup.log 2>&1"

Managing old DB2 backups

Purge old DB2 backups is not managed by the TSM server.
The backups ara managed by the DB2.  I use a new cron entry and a new scriptCreate a file called deldb2backup.ksh with the following lines:

db2adutl delete FULL older than 4 days  db FILES
db2adutl delete FULL older than 4 days  db OPNACT
db2adutl delete FULL older than 4 days  db COGNOS
db2adutl delete FULL older than 4 days  db PROJEXEC
db2adutl delete FULL older than 4 days  db METRICS
db2adutl delete FULL older than 4 days  db FNOS
db2adutl delete FULL older than 4 days  db SNCOMM
db2adutl delete FULL older than 4 days  db WIKIS
db2adutl delete FULL older than 4 days  db FORUM
db2adutl delete FULL older than 4 days  db FNGCD
db2adutl delete FULL older than 4 days  db HOMEPAGE
db2adutl delete FULL older than 4 days  db DOGEAR
db2adutl delete FULL older than 4 days  db PEOPLEDB
db2adutl delete FULL older than 4 days  db MOBILE
db2adutl delete FULL older than 4 days  db BLOG
Add the following line to root crontab

00 14 * * 6  su - db2inst1 -c "/home/db2inst1/delbackup.ksh >> /home/db2inst1/delbackup.log 2>&1"

 

 

Connections Linux

Today i receive a disk full alarm from my portal server. As usual i delete some logs and files left behind, but for this time this does not solve the issue.

Search for big files or what folder is bigger on linux is hard using du. Googling i found a nice toll and what i found was a big surprise.

I setup NCDU (NCurses Disk Usage) is a curses-based version of the well-known “du”, and provides a fast way to see what directories are using your disk space.

The setup is easy:

1 - yum install ncurses-devel ncurses

2 – download ncdu

3 – untar the file

4- ./configure –prefix=/usr

5 – make && make install

To run just type ncdu at / and the tool will scan your entire server.

Navigating on the toll i found a big folder inside of the connections portlets called “logs” full of files 5GB. The path on my server is :

/opt/IBM/WebSphere/wp_profile/installedApps/portalCell/PA_icWEFPtlts.ear/snor.pf.portlets.war/WEB-INF/logs

I check my server and no tarces are on.

Why these logs are there? I don’t know yet.  I just clean my server.

NCDU did the trick !  Thanks.

Linux portal

Yesterday i was installing a TSM Server for our company. The db2 installer complain about the /tmp size.

The installer need 2,5GB and my /tmp has only 2 GB.

I create a “disk” using dd command with 4GB on a partition with lots of space.

dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=4096
mkfs -t ext3 /usr/tmpDSK
file /usr/tmpDSK
umount /tmp

mount -o loop,exec,nosuid,rw /usr/tmpDSK /tmp

After the db2 installation i umount the /tmp and mount it back using fstab -a

Linux Uncategorized

Today i receive an mail with this article.

Some administration features that are available in an on-premises Lotus Domino environment are unavailable, are implemented differently, or have limitations within the SmartCloud Notes service.

It is very important to know this differences.

Domino

This WebSphere Support Technical Exchange will discuss WebSphere Application Server (WSAS) SSL topologies, SSL terminology, messages and config options like dynamic outbound endpoints, show some common problems and solutions with SSL sessions between WSAS and plug-in, LDAP, Dmgr and nodes, remote hosts and clients.

Click on this link to open the wecast record

WebSphere