Command Line Backup Error: Process exception > Object reference not set to an instance of an object

I’m using an un-released beta version of SQLBackupAndFTP linked in this thread:

Shows databases from another instance

I’m new to SQLBackupAndFTP and still in the evaluation phase. I’m trying to get the command line backup to work, but it’s failing with this error:

Process exception > Object reference not set to an instance of an object.

I believe the command line was working until I installed the beta version. Here is my command line:

SqlBak.Job.Cli.exe -runJob -jobName Captools -backupType Full

Is this a bug, or am I not executing the command line properly?

Hi Jeff,

Thank you for the issue reporting.

To investigate this case we need more details, could you please enable advanced log, reproduce the issue and send logs to developers.

Please find more details on how to do it at https://sqlbackupandftp.com/blog/how-to-send-log-to-developers

Sorry for the inconvenience.

Will these procedures capture jobs and processes invoked from the command line?

I followed the procedures to sent logs to the developers. Will they be able to match the logs I sent to my description of the problem in this thread?

Did you receive the logs I sent?

Hi Jeff,

Yes, we received your logs, but they are empty. Could you please make sure that advanced log is enabled, then reproduce the issue, and after the issue is reproduced, please send logs to developers.

I double-checked that advanced logging is enabled, then I deleted the logs, then I ran the command line twice:

I then sent the logs to the developers.

Then, I looked at the logs myself. There’s not much there! Here is the log contents:

2018-03-22 12:38:24.9607|DEBUG|45|Pranas.Net.SqlBak.Service.SBF.DesktopAppService|ClearAdvancedLogFiles
2018-03-22 12:38:48.6415|DEBUG|42|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Subscribe. Subscribing process: “5ac0ada2-7be1-467b-8f95-66c212cd34d7”
2018-03-22 12:38:51.7781|DEBUG|45|Pranas.Net.SqlBak.Service.Data.ConfigService|GetStaticProductVersion
2018-03-22 12:38:51.7781|DEBUG|27|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Unsubscribe. Unsubscribing process… ProcessId: “5ac0ada2-7be1-467b-8f95-66c212cd34d7”
2018-03-22 12:38:51.7781|TRACE|27|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Unsubscribe. The process has been removed
2018-03-22 12:39:43.9611|DEBUG|12|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Subscribe. Subscribing process: “0c52cec9-5632-4717-b3ba-c1d212ec5cdb”
2018-03-22 12:39:47.0967|DEBUG|45|Pranas.Net.SqlBak.Service.Data.ConfigService|GetStaticProductVersion
2018-03-22 12:39:47.0967|DEBUG|47|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Unsubscribe. Unsubscribing process… ProcessId: “0c52cec9-5632-4717-b3ba-c1d212ec5cdb”
2018-03-22 12:39:47.0967|TRACE|47|Pranas.Net.SqlBak.Service.Context.ServiceProcess|Unsubscribe. The process has been removed

The two time-stamps corresponding to the two command line executions are:

2018-03-22 12:38:48.6415, and 2018-03-22 12:39:43.9611

Is there anything in these logs that give the developers an idea of the problem?

Hi Jeff,

Thank you for the logs, we have checked them but it still isn’t enough information.

Could you please save the NLog.config file into the application folder C:\Program Files (x86)\SQLBackupAndFTP, restart “SQLBackupAndFTP (SQL Server backup)” Windows service, run the application and reproduce the issue. After the issue is reproduced please send us all log files from C:\Log\SBF folder.

To download Nlog.config file please follow this link https://www.dropbox.com/s/qsxhu9gz1k0rqf5/NLog.config?dl=0

To make your logs private please send them to support@sqlbackupandftp.com

Sorry for the inconvenience.

Hi Alexander,

I followed your instructions and just emailed you the Nlog / SBF folder. I peeked inside the log and it appears to have the relevant job and error information. Please let me know what the developers learn!

Jeff

Thank you. We’ll check it as soon as we can.

Hi @Alexander, I’m also seeing the same issue in the last 2 days or so. Would you like logs from me also?

Simon

Hi Simon,

Thanks, it’s ok, we are working to fix this issue. It will be fixed in the next release.

Sorry for the inconvenience.

Hi Alexander, Do you have an ETA for the next release?

Jeff

Hi Jeff,

We plan to release SQLBackupAndFTP version 11.6 till the end of this week.

Confirmed resolved in 11.6.1

Good news! Thanks for the feedback.

Please feel free to contact us on any issues or concerns.

11.6.1 also worked for us.

Good news! Thanks for the feedback.