Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Qlik NPrinting 17.x Repository Backup Batch File

cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Jenkins
Specialist III
Specialist III

Qlik NPrinting 17.x Repository Backup Batch File

Last Update:

Aug 13, 2016 11:23:19 PM

Updated By:

Daniel_Jenkins

Created date:

Aug 13, 2016 11:23:19 PM

Attachments

Users should be aware that the NPrinting 17.x repository may be removed in case of a failed upgrade: Upgrading NPrinting?  Read this. Taking regular backups of your files & data is always a good idea anyway and backing up your NPrinting Repository should be no different. Here is a batch file that you could run using your Windows Task Scheduler to automate Qlik NPrinting Repository backups.

Features:

  • Accepts the Repository password as the only parameter. Terminates if no password is provided
  • Checks to see if services QlikNPrintingEngine, QlikNPrintingScheduler and QlikNPrintingWebEngine are running and stops them before the backup. Starts them after the backup succeeds or fails. Be sure to schedule your backups when there are no other NPrinting tasks running or scheduled to run
  • Creates a new compressed file every time and parses date & time to name it
  • Logs each step of the backup process to a log file with the same name

To change manually:

  • Change this line to specify the backup destination folder: set BACKUPDIR="C:\NPrintingBackups\
  • Uncomment the appropriate line with the names of the services depending on the version of NPrinting. Documented in-line

Disclaimer:

  • Provided "as is". If you decide to use this batch file please test to make sure it works for you

HTH - Daniel.

Labels (1)
Comments
rittermd
Master
Master

Are the services settings the same for 17.2 as they are for 17.1?

Daniel_Jenkins
Specialist III
Specialist III

Hi Mark,

The services that are stopped and started have the same names in versions 17.1 & 17.2.x so I don't see the need to edit the file.

HTH - Daniel.

AcumenJonFoote
Partner - Contributor II
Partner - Contributor II

!Hi There

I have tried to implement this but as the Command Prompt runs its says access is denied while Stopping and Starting the Services, but in the log file its says it was successful. The services did not Stop and Start though. I have entered the Password in place of the %~1 in the batch file.

Is there something I am doing wrong?

Batch File result.PNG

Batch File Log.PNG

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Daniel,

I am not great in writing batch files and i tried to automate backup of repository.

So i would need pass through/embed password in the code, but i could not get it working.

Do you have a batch file where i could only paste my password in it as a parameter, save and have it scheduled in windows scheduler so my repo would be backed up on regular basis?

this would be a great help.

regards

Lech

Daniel_Jenkins
Specialist III
Specialist III

Hi Lech,

You can:

1. Remove or remark out line 13

2. replace %~1 with your password

OR

Use it as is and simply add the password as an argument in the Windows Task Scheduler Task

HTH - Daniel.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks Daniel,

I was close, but did not know where i should type the parameter in.

it all makes sense - thanks!

regards

Lech

Version history
Last update:
‎2016-08-13 11:23 PM
Updated by: