Procedure : Database Transfer from Astrium to MPE
Author : E. Wieprecht Version : 3 (16.09.2005)
Executed : Over night after end of working day
General
1. Remote login
ssh -X pacs@HIEGSE.redirectme.net
Database Transfer from Astrium
1. Log into database server computer
> ssh -X pacs@hos4-d > psetup
2. Check proper pcss version / set if necessary
> echo $PCSS_ROOT ---> Shall be : pcss-20050706A !!
- If necessary :
- Permanently :
> emacs .cshrc ---> change PCSS_ROOT > emacs .pcss/props ---> change var.pcss.dir = /home/pacs/pcss-20050706 >psetup
- or only for this window
> setenv PCSS_ROOT /home/pacs/<version> > emacs .pcss/props ---> change var.pcss.dir = /home/pacs/pcss-20050706 > psetup
3. backup
- First time make a complete (level 0) backup
> vbackup -dev pacseqmimt1_<date>.vbck -backup pacseqmimt1
- Second time we backup against level 0
> vbackup -level 1 -dev pacseqmimt1_<date>.vbck -backup pacseqmimt1
- Then we do backup only the changes against the last backup
> vbackup -level 2 -dev pacseqmimt1_<date>.vbck -backup pacseqmimt1
- The level selection has to be done appropriate
4. Copy backup file to transfer computer
> scp pacseqmimt1_<date>.vbck pacs@hosqla4-1:
5. Log into pacs1 as dbsa
> ssh -X dbsa@pacs1
6. FTP/copy data
> scp pacs@HIEGSE.redirectme.net:pacseqmimt1_<date>.vbck .
Restore Astrium data into MPE database
1. Log into pacs1 as dbsa
> ssh -X dbsa@pacs1 > cd dbbackups
2. Only the first time prepare the database
> makedb pacseqmimt1 > emacs /dbOper/versant/pacseqmimt1/profile.be In this file we set sysvol to 2047M or 8000 ... > createdb pacseqmimt1
- Normally not necessary :
> addvol -n extraspace -p /dbOper/versant/pacseqmimt1/extraspace -s 2047M pacseqmimt1
3. Set DBID
> dbid -d pacseqmimt1 > dbid -C 12012 pacseqmimt1
4. Restore database
> vbackup -dev pacseqmimt1_<date>.vbck -restore pacseqmimt1
!!!!!!!!!!!!!!!!!!!! ONLY if needed !!!!!!!!!!!!!!!!!!!!!!!!! We have schema 18 @Astrium - PCSS currently comes with schema 19
5. Copy DB for schema evolution (time consuming !)
- In case the database exists remove it first :
> removedb -rmdir pacseqmimt1A
- Multi user mode
> dbinfo -m pacseqmimt1 > makedb pacseqmimt1A
- Check size
> dbtool -F pacseqmimt1
- Expand on size
> emacs /dbOper/versant/pacseqmimt1A/profile.be --> set SYSVOL to 8000M
- Copy DB
> vcopydb pacseqmimt1 pacseqmimt1A
- Public access
> dbuser -add -P pacseqmimt1A
- DBID
> dbid -r pacseqmimt1A > dbid -d pacseqmimt1A > dbid -C 12013 pacseqmimt1A
5. check the schema of the database / adopt if necessary (may be time consuming !)
- Check schema
> schema_tool -v pacseqmimt1A
- Trick for schema evolution :
> setenv MALLOC_CHECK_ 1
- Single user mode
> dbinfo -1 pacseqmimt1A
- Execute schema evolution
> schema_evolver pacseqmimt1A
- Set to multi user mode
> dbinfo -m pacseqmimt1A