How to: Migrate Linux Printer Configuration to Another System

by Vivek Gite on November 6, 2007 · 7 comments

I've already outlined the detailed steps for migrating users, home directories and email to a new Linux server. I received a couple of emails asking about migrating printer configuration. From my mail bag:

Is it possible to migrate the printer configuration from one machine to another, just like user migration?

Yes, it is possible since Linux uses CUPS i.e. the common unix printing system. It is a modular printing system for Unix-like computer operating systems that allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them, and send them to the appropriate printer.

Migrate Linux Printer Configuration

CUPS stores its configuration at /etc/cups directory, so all you have to do is copy /etc/cups to a new computer. Open terminal and type the commands on old Linux computer:
# tar -cvzf /tmp/cups-$(hostname).tar.gz /etc/cups
Copy /tmp/cups* to new system using SCP or use USB pen driver:
# scp /tmp/cups* new.linux.server.com:/tmp

Now login to new system and type the following commands:
# mv /etc/cups /etc/cups.backup
# cd /
# tar -zcvf /tmp/cups*

Finally, restart the cups service:
# /etc/init.d/cupsys restart

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 7 comments… read them below or add one }

1 kolber911 February 20, 2008

thanks I was looking for this .

Reply

2 Alex C. November 16, 2008

Thanks – this helped me with my migration

Reply

3 someone March 27, 2009

the fact that this page was the first on my google search (something like “migrate linux printers terminal”) made the whole process be a matter of less than three minutes.
THNX

Reply

4 The Rock November 26, 2010

Is it working when upgrading from Linux 3 to Linux 5.5 when cups is also a different version?

Reply

5 Gopal November 26, 2011

i want to install a laser printer in rhel linux pc guidelines

Reply

6 Glenn January 27, 2012

I’m sure we’re all great sysadmins, but in the steps above, to unpack the tar file you copied over you use:

# tar -zcvf /tmp/cups*

Reply

7 Glenn January 27, 2012

OOPS!! Use:

# tar -zxvf /tmp/cups*

No ‘c’, which is for creating an archive, not unpacking it.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 5 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: