Red Hat Enterprise Linux 3: System Administration Guide
Prev | Chapter 36. Printer Configuration | Next

# 36.10. Saving the Configuration File

When the printer configuration is saved using the Printer Configuration Tool, the application creates its own configuration file that is used to create the files in the `/etc/cups` directory. You can use the command line options to save or restore the Printer Configuration Tool file. If the `/etc/cups/` directory is saved and restored to the same locations, the printer configuration is not restored because each time the printer daemon is restarted, it creates a new `/etc/printcap` file from the Printer Configuration Tool configuration file. When creating a backup of the system's configuration files, use the following method to save the printer configuration files.

To save your printer configuration, type this command as root:

    /usr/sbin/redhat-config-printer-tui --Xexport > settings.xml

Your configuration is saved to the file `settings.xml`.

If this file is saved, it can be used to restore the printer settings. This is useful if the printer configuration is deleted, if Red Hat Enterprise Linux is reinstalled, or if the same printer configuration is needed on multiple systems. The file should be saved on a different system before reinstalling. To restore the configuration, type this command as root:

    /usr/sbin/redhat-config-printer-tui --Ximport < settings.xml

If you already have a configuration file (you have configured one or more printers on the system already) and you try to import another configuration file, the existing configuration file will be overwritten. If you want to keep your existing configuration and add the configuration in the saved file, you can merge the files with the following command (as root):

    /usr/sbin/redhat-config-printer-tui --Ximport --merge < settings.xml

Your printer list will then consist of the printers you configured on the system as well as the printers you imported from the saved configuration file. If the imported configuration file has a print queue with the same name as an existing print queue on the system, the print queue from the imported file will override the existing printer.

After importing the configuration file (with or without the `merge` command), you must restart the printer daemon. Issue the command:

    /sbin/service cups restart

Prev | Home | Next
Modifying Existing Printers | Up | Command Line Configuration