Migrating Between Systems

Exporting and importing configurations, jobs, and settings when moving to new hardware or OS versions

Understanding Migration Scenarios

Migration preserves system configuration and operational state when:

Upgrading hardware : Moving to new server while maintaining job queues and settings

Changing OS versions : Migrating between Linux distributions or Unix platforms

Major release upgrades : Moving between major versions (e.g., Release 22.x to 23.x)

Disaster recovery : Restoring operations after hardware failure

System consolidation : Combining multiple installations onto single system

Migration Components

Xi-Text Migration Elements

Jobs : Active print queue including job data, parameters, ownership, and state

Printers : Printer definitions including names, devices, form types, and setup files

User permissions : Access privileges, default settings, and user-specific configurations

Printer setup files : Form type definitions, device configurations, and printer control scripts

System configuration : Base directories, network settings, and global parameters

Xi-Batch Migration Elements

Jobs : Scheduled jobs including scripts, timing, conditions, assignments, and state

Variables : Job control variables with current values and permissions

Command interpreters : Shell and interpreter configurations with load levels and nice values

User permissions : Privileges, load levels, priorities, and default modes

Holiday calendar : Days to avoid for scheduling calculations

System configuration : Base directories, network settings, load level limits

When Migration Tools Are Required

Major release changes only : Moving from Release 22.x to 23.x requires migration. Moving from 23.43 to 23.361 does not.

Minor version upgrades : Within same major release, stop old version, install new binaries, restart. No migration needed.

Platform changes : Moving between Unix/Linux variants may require migration depending on version compatibility.

Xi-Text Migration Procedure

Step 1: Backup Current Installation

Create backup directory structure:

bash

# Create timestamped backup directory
BACKUP_DIR="/usr/textsave/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_DIR/Scripts"
cd "$BACKUP_DIR"

Step 2: Export Jobs

bash

# Ensure cjlist is available
export PATH=$PATH:/usr/spool/xi_distrib/Text

# Export jobs to shell script
cjlist -D /usr/spool/spd spshed_jfile Jcmd Scripts

This creates:

  • Jcmd - Shell script with spr commands to recreate jobs
  • Scripts/ - Directory containing job data files

What gets exported:

  • Job numbers and titles
  • User ownership and permissions
  • Form types and printer destinations
  • Job parameters (copies, priority, page ranges)
  • Job data (actual files to be printed)
  • Job states and hold status

Step 3: Export Printers

bash

# Export printer definitions
cplist -D /usr/spool/spd spshed_pfile Pcmd

Creates Pcmd - Shell script with spadd commands to recreate printer configurations.

What gets exported:

  • Printer names and descriptions
  • Device assignments
  • Form types
  • Class codes

Not exported: Printer setup files in /usr/spool/printers/. Copy these separately:

bash

# Backup printer setup files
tar czf "$BACKUP_DIR/printer-setups.tar.gz" /usr/spool/printers/

Step 4: Export User Permissions

bash

# Export user profiles
dumpsuser > "$BACKUP_DIR/Ucmd"

Creates shell script with spuser commands to recreate user permissions and defaults.

Step 5: Stop Xi-Text

bash

# Graceful shutdown
sstop -y

# Verify stopped
ps aux | grep spshed

Step 6: Backup Configuration Files

bash

# Copy system configuration
cp /etc/Xitext-config "$BACKUP_DIR/"
cp /etc/Xitext-hosts "$BACKUP_DIR/"

# Copy any custom scripts or programs
tar czf "$BACKUP_DIR/progs.tar.gz" /usr/spool/progs/ptr_alert*

Step 7: Install on New System

Follow standard installation procedure on target system, setting appropriate base and user directories.

Step 8: Restore Configuration Files

bash

# Copy config files to new system
scp $BACKUP_DIR/Xitext-config newhost:/etc/
scp $BACKUP_DIR/Xitext-hosts newhost:/etc/

Step 9: Restore Printer Setup Files

bash

# On new system
cd /usr/spool/printers/
tar xzf /path/to/printer-setups.tar.gz --strip-components=3

Step 10: Restore Printers

bash

# Stop Xi-Text if running
sstop -y

# Execute printer creation script
bash "$BACKUP_DIR/Pcmd"

# Verify printers
splist

Step 11: Restore User Permissions

bash

# Execute user permissions script
bash "$BACKUP_DIR/Ucmd"

# Verify users
spuser -l

Step 12: Restore Jobs

bash

# Start Xi-Text
spstart

# Execute job restoration script
bash "$BACKUP_DIR/Jcmd"

# Verify jobs
spq

Xi-Batch Migration Procedure

Step 1: Backup Current Installation

bash

# Create backup structure
BACKUP_DIR="/usr/batchsave/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_DIR/Scripts"
cd "$BACKUP_DIR"

Step 2: Export Jobs

bash

# Export batch jobs
xb-cjlist -D /var/spool/xi/batch btsched_jfile Jcmd Scripts

Creates:

  • Jcmd - Shell script with btr commands
  • Scripts/ - Job script files

What gets exported:

  • Job numbers and titles
  • Command interpreters
  • Time settings and repeat specifications
  • Conditions and assignments
  • Load levels and priorities
  • User ownership and modes
  • Exit code handling
  • I/O redirections

Step 3: Export Variables

bash

# Export variables
xb-cvlist -D /var/spool/xi/batch btsched_vfile Vcmd

Creates Vcmd - Shell script with btvar commands to recreate variables.

Important: Restore variables before jobs, as jobs reference variables in conditions/assignments.

Step 4: Export Command Interpreters

bash

# Export interpreters  
xb-ccilist -D /var/spool/xi/batch Icmd

Creates Icmd - Shell script with bti commands to recreate command interpreter configurations.

Step 5: Export User Permissions

bash

# Export user profiles
xb-cusers > "$BACKUP_DIR/Ucmd"

Step 6: Export Holiday Calendar

bash

# Export holidays
xb-cholist > "$BACKUP_DIR/Hcmd"

Step 7: Stop Xi-Batch

bash

# Graceful shutdown
btquit -y

# Verify stopped
ps aux | grep btsched

# Clean IPC resources
xb-ripc -d

Step 8: Backup Configuration

bash

# Copy configuration files
cp /etc/Xibatch-config "$BACKUP_DIR/"
cp /etc/Xibatch-hosts "$BACKUP_DIR/"

Step 9: Install on New System

Perform standard Xi-Batch installation on target system.

Step 10: Restore Configuration

bash

# Copy to new system
scp $BACKUP_DIR/Xibatch-config newhost:/etc/
scp $BACKUP_DIR/Xibatch-hosts newhost:/etc/

Step 11: Restore in Correct Order

Order matters - restore in this sequence:

bash

# 1. Stop Xi-Batch
btquit -y

# 2. User permissions
bash "$BACKUP_DIR/Ucmd"

# 3. Command interpreters
bash "$BACKUP_DIR/Icmd"

# 4. Holiday calendar
bash "$BACKUP_DIR/Hcmd"

# 5. Start Xi-Batch
btstart

# 6. Variables (requires running scheduler)
bash "$BACKUP_DIR/Vcmd"

# 7. Jobs (must be last)
bash "$BACKUP_DIR/Jcmd"

Step 12: Verify Migration

bash

# Check jobs
btjlist

# Check variables
btvlist

# Check command interpreters
btq -D

# Verify scheduler
ps aux | grep btsched

Editing Migration Scripts

The generated shell scripts (Jcmd, Pcmd, etc.) are human-readable and editable. Common modifications:

Selective restoration : Comment out or delete unwanted jobs/printers/variables

Parameter changes : Edit commands to change owners, priorities, paths, etc.

Filtering : Use grep/awk to create filtered versions:

bash

# Only restore jobs for specific user
grep "^btr.*-U jsmith" Jcmd > Jcmd-jsmith

# Only restore high-priority jobs
grep "^btr.*-p 150" Jcmd > Jcmd-priority

Common Migration Patterns

Test migration before production : Restore to test system first, verify functionality, then migrate production

Selective migration : Migrate configuration and structure, but start with fresh job queue

Incremental migration : Migrate users and printers first, allow new jobs to be submitted rather than restoring old queue

Parallel operation : Run old and new systems simultaneously during transition, allowing old system to complete existing work

Platform-Specific Considerations

Path differences : Edit scripts if base directories differ between systems (/usr/spool vs /var/spool/xi)

User/group IDs : Verify spooler/batch users have same UIDs on new system, or jobs may have ownership issues

Device names : Printer device paths may differ (/dev/lp0 vs /dev/ttyS0). Update printer definitions accordingly.

Network addressing : Update /etc/Xitext-hosts or /etc/Xibatch-hosts if hostnames or IP addresses change

Verifying Successful Migration

Job integrity : Compare job counts and spot-check job details match original system

User access : Test that users can submit jobs, view queues, and perform normal operations

Scheduling : For Xi-Batch, verify jobs execute at scheduled times with correct conditions

Printer operation : For Xi-Text, test printing to each migrated printer

Network operation : If networked, verify remote jobs and shared printers function correctly

Troubleshooting Migration

"Job/variable/printer already exists" errors during restore : Scripts detect existing items. If intentional, edit script to remove duplicates. If error, clean target system first.

"Command interpreter not found" errors : Restore command interpreters (Icmd) before jobs. Missing interpreters prevent job restoration.

"Variable does not exist" errors : Restore variables (Vcmd) before jobs that reference them in conditions/assignments.

Permission denied errors : Verify restoration scripts run as root or appropriate user. Check file ownership in spool directories.

Jobs don't execute after migration : Check Xi-Batch is running (btstart). Verify load levels (LOADLEVEL variable). Check job conditions are satisfied.

Quick installation guide for experienced system administrators
Non-interactive installation using command-line options for rapid deployment