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:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop












{ 8 comments… read them below or add one }
thanks I was looking for this .
Thanks – this helped me with my migration
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
Is it working when upgrading from Linux 3 to Linux 5.5 when cups is also a different version?
i want to install a laser printer in rhel linux pc guidelines
I’m sure we’re all great sysadmins, but in the steps above, to unpack the tar file you copied over you use:
OOPS!! Use:
No ‘c’, which is for creating an archive, not unpacking it.
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.