Automating the primary Printer Installer database export and backup Printer Installer database import

Automating the Printer Installer database export from the primary Printer Installer server and import to the backup Printer Installer server: The below steps will automate the following:
  • Exporting the printer_installer database from the primary server
  • Copying the database from the primary server to the backup server
  • Importing the database to the backup server

Setup the Export Batch File

  1. Download PrinterInstaller_Database_Export_Import.zip
  2. Extract the zip folder to c:\PrinterInstaller_Database_Export on the primary Printer Installer server.
  3. Open C:\inetpub\wwwroot\config\setting.php with notepad and copy the DBPassword value.
  4. Open PrinterInstaller_Database_Export.bat with notepad and past the dbpassword value after password= e.g. password=wluj3k3jlk3jd
  5. Save the file.

Automate the Database Export

  1. Open Task Scheduler by clicking on Start > Administrative Tools > Task Scheduler.
  2. Click on the Task Scheduler Library folder and then click Create Basic Task...
  3. Name the task Printer Installer Database Export and click Next.
  4. Click Daily and click Next.
  5. Set the time of day that you want the export to happen, and then click Next.
  6. Select Start a program, and then click Next.
  7. Click Browse and then select C:\PrinterInstaller_Database_Export\PrinterInstaller_Database_Export.bat, and then click Open and then click Next.
  8. Check the Open the Properties dialog for this task when I click Finish option and then click Finish.
  9. Click Change User or Group..., type System, and then click OK.
  10. Click OK.

Share the Folder Containing the Database Export

  1. Right click on the c:\PrinterInstaller_Database_Export folder and select Properties, click the Sharing tab, click the Advanced Sharing button, click the Share this folder option, and then click the permissions button. Click the Everyone entry and then click Remove. Click the Add… button, and then click the Object Types… button, tick the Computers box and click OK. Type in the name of the backup server and click OK. Click OK. Click OK. Click Close.

Setup the Import Batch File

  1. Copy the c:\PrinterInstaller_Database_Export\PrinterInstaller_Database_Import.bat file from the primary server to the backup server's c:\PrinterInstaller_Database_Import folder (create the folder on the backup server).
  2. Open the backup server's C:\inetpub\wwwroot\config\setting.php with notepad and copy the DBPassword value.
  3. Open the backup server's c:\PrinterInstaller_Database_Export\PrinterInstaller_Database_Import.bat with notepad and past the dbpassword value after password= e.g. password=wluj3k3jlk3jd
  4. Replace \\PrimaryServer on the first line of the file with the actual primary server name. NOTE: If you try to access the \\PrimaryServerPrinterInstaller_Database_Export share it will fail because you only gave rights to the backup server computer object to access the share. The scheduled task created below will run as the backup server's computer object and will have rights to the share.
  5. Save the file.

Automate the Database Import

  1. Open Task Scheduler by clicking on Start > Administrative Tools > Task Scheduler.
  2. Click on the Task Scheduler Library folder and then click Create Basic Task...
  3. Name the task Printer Installer Database Import and click Next.
  4. Click Daily and click Next.
  5. Set the time of day that you want the import to happen, and then click Next.
  6. Select Start a program, and then click Next.
  7. Click Browse and then select C:\PrinterInstaller_Database_Import\PrinterInstaller_Database_Import.bat, and then click Open and then click Next.
  8. Check the Open the Properties dialog for this task when I click Finish option and then click Finish.
  9. Click Change User or Group..., type in System, and then click OK.
  10. Click OK.