How to: Migrate Linux Printer Configuration to Another System

by on November 6, 2007 · 14 comments· LAST UPDATED November 6, 2007

in , ,

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*

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

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 14 comments… read them below or add one }

1 kolber911 February 20, 2008 at 4:22 pm

thanks I was looking for this .


2 Alex C. November 16, 2008 at 3:43 pm

Thanks – this helped me with my migration


3 someone March 27, 2009 at 10:58 am

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.


4 Dirk March 18, 2010 at 4:57 pm

Thanks for the info, but there is small typo on the remote server. Instead of tar -zcvf /tmp/cups*, it should say “tar -zxvf /tmp/cups*” — “x” for expand the cups* file.


5 The Rock November 26, 2010 at 3:10 pm

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


6 Gopal November 26, 2011 at 1:37 pm

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


7 Glenn January 27, 2012 at 4:06 pm

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*


8 Glenn January 27, 2012 at 4:08 pm

OOPS!! Use:

# tar -zxvf /tmp/cups*

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


9 scott belbin January 31, 2013 at 2:06 pm

The above commands worked great but I still can not see my printers under the Text Mode Setup Utility & printer configuration menu in red hat enterprise 4. The cups service was restarted


10 Fidtz February 27, 2013 at 12:12 pm

Thanks for this post, it was really helpful, a massive time saver.

Finding someone knowledgeable who says, yes it is actually still ok to copy config files in Linux is very re-assuring.


11 Nick September 4, 2013 at 1:36 am

How about the custom PPD’s in /usr/share/cups?


12 milen September 6, 2013 at 4:54 pm


On the new Linux box – cups will fail to restart if in the config file:
you have a line like this:
where is the IP of the the Old Linux box.
Replacing the IP of the old Linux box with IP of the new one, solves the problem!


13 Trevor October 6, 2013 at 3:18 am

You could also set the IP address to – in which case it will work no matter what machine it is on


14 Shukor March 14, 2014 at 6:41 am


On my RHEL6.3, I was getting “Filter “/usr/lib64/cups/filter/foomatic-rip” error after restart the cups daemon. Issue solved once installed the foomatic rpm.


Thanks nixCraft!! :)


Leave a Comment

Tagged as: , , , , , , ,

Previous post:

Next post: