iprintmig - Migration utility for Novell iPrint
This section contains iPrint commands and utilities used on the Linux platform.
iprintmig -s <server> -u <user> <options> -n<printer1>...<printerN>
iprintmig -s <options>
iprintmig is a management tool used to migrate printers to OES Linux.
Print this summary.
Specify the level of detail to display about the execution of operations with -v displaying minimum information and -vvvv displaying maximum information.
Print version information.
Specify the source server hostname or address to migrate from.
Specify the target server hostname or address to migrate to.
Specify the destination print manager DN to migrate to.
Specify the FDN format admin for the source server, such as cn=admin, 0=example.
Specify the FDN format admin for the target server, such as cn=admin, 0=example.
Password of the source server admin user.
File descriptor number to read the source admin password.
Password of the user on the target server.
File descriptor number to read the destination admin password.
Target IDS server hostname or address. Defaults to dst.
Distinguished name of the target IDS.
Server hostname or address of the eDirectory server for the target server to use.
Name of the printer to migrate. Can be specified multiple times.
File containing names of printers (1 per line) to migrate.
File descriptor number listing names of printers to migrate.
Migrate all printers from the source.
DN of the container to create print objects in (conflicts with -S).
Create objects on the target server with the same DN as the source server. Only valid when migrating to a new tree.
Create a manager on the target server with the same hostname as the source manager. Useful when migrating the entire print server.
Save the XML migration processing file to <file>.
Indicates the version of the operating system on the source server.
Do not migrate drivers. If drivers are not present in destination IDS, clients cannot install printers.
If the destination IDS has a driver with the same name as a corresponding driver on the source server, overwrite it.
Do not migrate access control lists (ACLs).
Do not migrate profiles. If profiles are not present on the target server, clients won't be able to install printers.
If the target server has a profile for a driver with the same name as a profile on the source server, overwrite it.
Prepare but do not perform migration. This option creates an output XML file and migrates drivers (unless --nodrivers was specified) but does not perform migration.
Prints debug messages to a /var/opt/novell/log/migration/iprintmig.log file.
This option synchronizes any changes in the source server data with the target server after the migration process is complete. This option must be used in conjunction with the -a option.
Lets you resume the migration process from where it was suspended.
Validates the parameters passed for the migration process and returns the status without actually starting the migration.
Use this option to aggregate services on a single target server from multiple source servers.
Use this option to enable secure authentication.
Indicates the LDAP port.
Use this option if you want the contexts of the source printers to be created under a different context on the target server. The context of the target printer is specified by using the -c<DN>, --dst-container <DN> option.
Use this option to migrate the printers from the source server to the target server without changing the identity.
For security reasons, it is safest to transmit passwords to the script via an environment variable or via the -P/-T options, because any user of the system can view the password if it is on the command line (-p/-t options).
Instead, have the calling program set its environment with the following two variables:
IPRINTMIG_SRC_PASSWORD=examplePassword1
IPRINTMIG_DST_PASSWORD=examplePassword2
Then you can execute the following command, which migrates all the printers from server1.example.com to the server where the script is being run.
iprintmig -s server1.example.com -u admin.example.us -U admin -a -x psminfo.xml -I cn=ids,o=example,c=us \-i ids.example.com -c ou=iPrint,o=example,c=us
The following example migrates few printers at a time while explicitly specifying the hostname of the new print manager:
iprintmig -s server1.example.com -d newserver.example.com -u admin.example.us -U admin -x psminfo.xml \ -I cn=ids,o=example,c=us -i ids.example.com -c ou=iPrint,o=example,c=us -n printer1 -n printer2 \-n printer3 -n printer4
If a calling program specifies a large number of printers, there are three ways to do it:
The -n (or --printer-name) option can be specified with a printer name one or more times, as in the example above. This can create a very long command line if many printers are being migrated, so this usage is discouraged.
A file containing printer names, one per line, can be specified by using the -f (or --printers-file) option. For a calling program to use this file, the program must first write the list of printers to a temporary file.
The calling program can avoid the use of a temporary file by using the -F (or --printers-fd) option, which allows the calling program to send the list of printer names over a pipe created, for example, with socketpair(). On using the -f (or --printers-file) option, printer names are read from the file descriptor, one per line.
A simple example of this usage follows in C. Similar methods are available with the Mono Mono.Posix.Syscall members:
char *printers[] = { "p1", "p2", "p3" }; int fds[2], pid, rc; rc = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); if (rc < 1) { perror("Error creating socket pair"); exit(1); } pid = fork(); switch (pid) { case -1: //Error perror("Fork failed"); exit(1); case 0: //Parent close(fds[1]); for (int i; i < (sizeof(printers)/sizeof(char**)); ++i) { write(fds[0], printers[i], strlen(printers[i])); write(fds[0], "\n", 1); } close(fds[0]); break; default: //Child close(fds[0]); //Set an environment that contains the password env vars //Make sure that close on exec isn't set for fds[1] //exec the iprintmig script with "-F" and fds[1] converted from an int to a string as arguments }
Most of the information that this program requires can be obtained from the eDirectory objects that the user selects. For example, to migrate all printers from a NetWare server to the new Linux server, the user needs to select the old PSM object, which contains the address of the server it is running on. Then the user needs to select the destination PSM, which has attributes for its network address, which eDirectory server it is using, which IDS it is using (and the corresponding IDS object has its own address).
There are some details that cannot be selected or discovered but must be provided by the user, such as details about credentials and whether or not to migrate profiles or drivers.
The user can select a destination container to hold the objects created during migration, or the user can choose to keep the same path for objects (which only works for a move from one tree to another, because NetWare-style objects already exist in the source tree and might conflict with the new Linux versions of the objects).
Novell, Inc.
Copyright ©2008, Novell, Inc. All rights reserved.
iprintman