Note: This works with OES 2 and OES 11
The iPrint Duplication Script (iPrint_Duplication-1.6.sh) reads an OES Linux iPrint server configuration and replicate it to another OES Linux server. This can be run as a migration or to create a fault tolerant backup solution. With a proper iPrint DNS configuration (which this documentation expounds on), user's print jobs can be instantly and non-intrusively redirected to the new server. If a problem hits the primary server (server problem, iPrint configuration problem, etc), production printing does not need to be interrupted while that problem is worked on.
Backup iPrint Server
iPrint printers installed to workstations don't know the server name, server IP, Print Manager name, Driver Store name, or printer agent eDirectory context. The iPrint printers installed to workstations know only two pieces of information: Printer Agent name and the address bound to the Print Manager. To understand the phrase "address bound to the Print Manager", see TID 7008242. When the address bound to the Print Manager is transferable, redirecting user print jobs from one server to another is fast, simple, and completely non-detectable by the end user. This redirection is accomplished by modify DNS records. Again, see TID 7008242 for more information on this subject.
Note: A new companion script has been created to keep the changes syncronized between the active and backup server. Click here to download.
The official iPrint Migration Tool (component of miggui) doesn't technically migrate printers from one server to another, but rather duplicates the printer information and print drivers from one server to another. iPrint_Duplication-1.6.sh does the same. iPrint_Duplication-1.6.sh has the benefit of relying on fewer technologies, which increases the speed and reliability of the migration. iPrint_Duplication-1.6.sh is inferior to miggui in the following ways:
- miggui allows migration of select printer agents. iPrint_Duplication-1.6.sh migrates all printer agents.
- miggui allows for the migrated printer agents to exist in the same eDirectory context as the original printer agents.
- miggui has the option to migrate only drivers which don't already exist on the destination server.
Note: The iPrint Duplication Script now supports OES 11.
- Download iprint_duplication-1.6.tgz
- Open a Terminal window and type “su”.
- Enter root’s password.
- Extract the script from the tarball.
#tar –xzvf iprint_duplication-1.6.tgz
- cd to the iPrint_Duplication folder.
- Make the script executable.
#chmod 755 iPrint_Duplication-1.6.sh
- Run the iPrint Duplication Script and answer the questions.
- Your iPrint sytem should now been duplicated.
Detailed information for each question presented by the script:
Update: iPrint duplication videos have been created to demonstrate the entire process. Click here for TID 7008502 and watch them
Do you have a context created to contain your new iPrint objects?
Have executed "iprintman psm -l" successfully on this server?
The intent behind each question is to build an XML file which will be imported after all questions have been answered. Therefore, it is recommended you ensure that iprntman (also can be spelled iprintman) can successfully authenticate with the user you intend to present during the question/answer portion of the script.
When providing the user name, be sure to:
- Provide an eDirectory user which is LUM enabled
- Provide only the CN of that user.
- For example: admin
2. Configure trusted host relationship between the source and destination servers.
Would you like trusted hosts setup between the two iPrint servers?
Note: The shared keys will be removed at the end of the script.
The script will copy the padbtxt.xml from the source server to the destination server. Trusted hosts must be configured for this copy to occur. Y must be answered to progress with the script.
3. Further trusted host configuration.
What is the DNS or IP of the source iPrint server?
This question is being asked to help setup the trusted hosts.
4. Create the ssh key pairs.
ssh key pairs being created.......................
This creates the default trusted key pair configuration.
5. Final trusted key pair setup.
Executing ssh for key generation.
Please enter the password for root on the source iPrint server.
The servers can now securely copy the needed iPrint files from the source server to the destination server.
6. Configure eDirectory authentication.
Please enter your eDirectory admin user (NO context--Example: admin):
The answer to this question will later be auto passed to the iprntman authentication at the end of this script's execution. See the Pre-requirements question to understand how to ensure this is answered correctly.
7. Configuring the destination Driver Store and Print Manager.
Would you like to create a new Driver Store or specify an existing one [(C)reate|(S)pecify]?
The following Driver Store was found on the local server
<Detected Driver Store name and context>
Would you like to use the specified Driver Store [(Y)es|(N)o]?
One of the two questions will be presented, depending on whether a Driver Store object has already been configured to the destination server. If you chose to allow the script to create a new Driver Store object, you will be asked:
Enter the FQN for the creation of the destination Driver Store:
8. This step will decide the name and context which the Driver Store will be created. The context must already exist.
Enter the FQN for the creation of the Print Manager:
The following Print Manager was found on the local server
<Detected Print Manager name and context>
Would you like to use the specified Print Manager [(Y)es|(N)o]?
The same concepts apply here as the above Driver Store questions.
9. Decide where the new iPrint printer objects will exist in eDirectory.
Enter the context to where the new printer objects will be created.
Note, the context must already exist.
The script will create new iPrint objects which will have the same name as the iPrint objects on the source server. Obviously, eDirectory will not allow two objects by the same name in the same context. Therefore, a different context must be provided.
NOTE: The iPrint client does not know about eDirectory contexts, so having iPrint objects in a different context will not impede the end user workstations from printing to the new iPrint objects. See step 11 to understand how the iPrint client finds iPrint printers.
10. Choose which replica holding server the Print Manager will be configured to authenticate against.
Enter the IP or DNS name of a server holding a replica of the new print objects.
This answer provided here will write this address to the /etc/opt/novell/iprint/conf/ipsmd.conf's DSServer1 value. This value will determine which eDirectory replica server will be contacted when ipsmd loads and attempts to authenticate. It is important to choose a server which holds a real copy of the Print Manager object. A NetWare server's IP or DNS is also an acceptable answer.
11. Decide which address the new Print Manager will be bound to.
Please enter the DNS or IP for the new host address.
This will be the address which is bound to the new Print Manager. See TID 7008242 for an explanation of how to answer this question and understand the implications of the answer.
The source address bound to the Print Manager on <serverDNS> is <transferrableDNS>
This address appears to be a transferable DNS name.
Would you like to keep the same host address for the new Print Manager?
See TID 7008242 for an explanation of how to answer this question and understand the implications of the answer.
Understanding this question and its answer is very important. Improperly answering this question could cause all of the iPrint printers installed to workstations to be auto uninstalled and auto installed, or cause iPrint printers installed to workstations to be unable to print once the source server is decommissioned. Carefully review TID 7008242 prior to answering this question.
The answer to this question will be inserted in the target server's /etc/opt/novell/iprint/conf/ipsmd.conf's PSMHostAdress line.
- Copies the padbtxt.xml from the source server to the target server.
- Transforms the XML with the answers provided above. The script creates the transformed XML file as output.xml, in th same directory which the script is run.
- Creates the Driver Store (if it did not already exist).
- Copies the contents of /var/opt/novell/iprint/resdir from the source to the destination server (the print drivers).
- Copies the /var/opt/novell/iprint/htdocs/iprint.ini from the source server to the destination server.
- Creates the Print Manager (if it did not already exist).
- Imports the printer agents to the new print manager using an 'iprntman psm --xml-import' command.