Starting Backup using command line parameters failed

For technical support visit http://support.2brightsparks.com/
Andi65
Newbie
Newbie
Posts: 4
Joined: Fri Oct 23, 2015 8:41 pm

Starting Backup using command line parameters failed

Postby Andi65 » Fri Nov 03, 2017 2:38 pm

Hi folks,

I am using Syncback Pro 8.2.18 under Windows 1o Pro as a normal user (no admin rights). I tried to backup some data using command line parameters instead of the GUI. The batch file content looks like this:
"c:\Users\Andi1\Desktop\SyncBackPro.lnk" NAS1-2_Netz_Tmp.sps -n > C:\Users\Andi1\Downloads\log.log

The profile NAS1-2_Netz_Tmp.sps is stored in the same folder where the batch files is started. The log file contains after the session 0 bytes!
What happens: when I start the batch file Syncback starts after about 1 second and terminates immediately. The program window is visible less than half a second just like a splash screen. No file was copied, nothing happens any more.

Does anybody has a hint for me which mistake I did in the batch file?

Thanks in advance
Andi

cliffhanger
Expert
Expert
Posts: 753
Joined: Tue May 31, 2011 5:59 pm

Re: Starting Backup using command line parameters failed

Postby cliffhanger » Sat Nov 04, 2017 11:47 am

Andi65 wrote:"c:\Users\Andi1\Desktop\SyncBackPro.lnk" NAS1-2_Netz_Tmp.sps -n > C:\Users\Andi1\Downloads\log.log

contains several parts which are either unorthodox or simply wrong; I'll answer each part in turn

  • "C:\Users\Andi1\Desktop\SyncBackPro.lnk" is an unorthodox calling method - you are calling (chaining) a desktop shortcut to the EXE file, whereas the orthodox method is to call (supply the path to & name of) the EXE file itself directly. Bear in mind that if the desktop shortcut ever gets moved (maybe into a folder?), deleted or corrupted, your batch file will break, whereas it would need the SB EXE file itself to be moved/deleted/damaged to break a batch file containing an orthodox command string. You can steal the orthodox path\name (which varies depending if 32-bit or 64-bit, which you haven't stated) from the desktop shortcut - simply right-click shortcut > Properties > Copy (Ctrl-C) > Paste into the batch file.
  • NAS1-2_Netz_Tmp.sps is not the name of a profile, it is the name of a compressed backup copy of a profile. You cannot run an SPS file, you can only Import it, which is what I would expect (and what it appears, from your description) is happening each time you run your batch file (Importing the same profile into Pro over and over again). If you remove the .sps from the end of the name (which Pro is detecting and adjusting its behavior accordingly) it should reference the actual installed profile, provided this is stored in a location visible to the user (name) running the batch file, which - if you are not running the batch file as a different user (to the user who normally runs Pro) - it probably will be. There is no need/provision to supply a path to the profile (or to provide a local 'copy' of it, which you may be trying to do). SB will automatically & simply look for a profile of that name in all the locations (several of which are username-dependent) where profiles 'belonging' to [the user who runs the batch file] can potentially have been stored.
  • -n switch is in the wrong place - as per the Help "-n: The profiles following this parameter..." you should place the switch before the profile name(s) you want to be run in Normal mode. TLDR: switch goes first, profile-name goes after...
  • > C:\Users\Andi1\Downloads\log.log - not sure what you are hoping to achieve by this, but I suspect it will simply record a numerical exit code (as per list at foot of Help section about Command Line Parameters) if you run a profile (which at the moment you are not). I'm not sure what exit code (if any) is generated for a successful Import, and as one isn't listed, there may well not be one. Things might change once you are actually running a profile ;)
In conclusion, the likely successful string (using orthodox calling) would be one or the other of

"C:\Program Files\2BrightSparks\SyncBackPro\SyncBackPro.exe" -n NAS1-2_Netz_Tmp > C:\Users\Andi1\Downloads\log.log OR

"C:\Program Files (x86)\2BrightSparks\SyncBackPro\SyncBackPro.exe" -n NAS1-2_Netz_Tmp > C:\Users\Andi1\Downloads\log.log

depending whether your copy of Pro and/or your copy of Windows are both 32-bit, both 64-bit or a mixture of the two. It also assumes you have installed Pro in the default location. Both of these aspects should be catered for if you 'steal' the path to the EXE as mentioned above.

Note that I have not wrapped the profile name in quotes here because there are no spaces in it; if there are spaces, you must do so.

Andi65
Newbie
Newbie
Posts: 4
Joined: Fri Oct 23, 2015 8:41 pm

Re: Starting Backup using command line parameters failed

Postby Andi65 » Sun Nov 05, 2017 8:55 pm

Hi,

many thanks for your long and exact reply. It works now!

But: I was still wondering that the link to the application does not work. I use this technic also for scanning for viruses and it works fine.
Nevermind, now I am happy and can use backup and following virus scan in one batch file.

Greetings, Andi


Return to “SyncBackPro (commercial)”



Who is online

Users browsing this forum: Baidu [Spider] and 3 guests