Monday, June 13, 2011

Automate Windows Print Server backup

Backing up Windows 2003 Print Server settings using printmig.exe:

Put this exe file on your  2003 server (let's say in c:\printerbkp).Create bellow batch file and create a new scheduled task to run this.


del c:\printerbkp\
ren c:\printerbkp\
ren c:\printerbkp\
ren c:\printerbkp\
ren c:\printerbkp\
ren c:\printerbkp\
c:\printerbkp\printmig -b c:\printerbkp\ –i


Backing up Windows 2008 Print Server Settings:
The printmig.exe utility does not work under Windows 2008, but there is another (similar) tool that can be used to backup the printers via a script.  This tool is not available on the server by default, it only gets installed when you install the "Print Services Tools" Feature.
Create a folder to hold the backups ("c:\printerbkp"), and use the following script to perform the actual backups and create a new scheduled job for it :
del c:\printerbkp\printers.printerExport.5
ren c:\printerbkp\printers.printerExport.4 printers.printerExport.5
ren c:\printerbkp\printers.printerExport.3 printers.printerExport.4
ren c:\printerbkp\printers.printerExport.2 printers.printerExport.2
ren c:\printerbkp\printers.printerExport.1 printers.printerExport.1
ren c:\printerbkp\printers.printerExport printers.printerExport.1
%WINDIR%\System32\Spool\Tools\printbrm -B -O FORCE -F c:\printerbkp\printers.printerExport


No comments: