How to: Migrate Linux Printer Configuration to Another System

by on November 6, 2007 · 8 comments· Last updated November 6, 2007

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



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 8 comments… read them below or add one }

1 kolber911 February 20, 2008 at 4:22 pm

thanks I was looking for this .

Reply

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

Thanks – this helped me with my migration

Reply

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.
THNX

Reply

4 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?

Reply

5 Gopal November 26, 2011 at 1:37 pm

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

Reply

6 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*

Reply

7 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.

Reply

8 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.

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 8 + 5 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Tagged as: , , , , , , ,

Previous post:

Next post: