Qlik Community

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

Announcements
See why Qlik is recognized as a Leader for the 10th year in a row – and discover how Qlik can help put your business in the lead. Get Report

Qlik NPrinting 17.x Repository Backup Batch File

Support
Support

Qlik NPrinting 17.x Repository Backup Batch File

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)
Attachments
Comments
rittermd
Honored Contributor

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

0 Likes
Support
Support

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.

0 Likes
Partner
Partner

!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

0 Likes

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

0 Likes
Support
Support

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.

Thanks Daniel,

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

it all makes sense - thanks!

regards

Lech

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2016-08-13 11:23 PM
Updated by: