Hi,
I’d like to create daily backup from Octopus data, so I’ve crated a .cmd file, that is calling the export from command line with the command showed by Octopus, when using Octopus Manager:
“C:\Program Files\Octopus Deploy\Octopus\Octopus.Migrator.exe” export --instance “OctopusServer” --directory “C:\OctopusBackup\Files” --password "xxx"
When I’m logging in to the server and running the file by double clicking it, it runs as expected, the export is created. Although when I’m trying to run the same .cmd file via Windows Task Scheduler, it logs the following error:
“Octopus Deploy: Migrator version 3.4.3 (3.4.3+Branch.master.Sha.d7c942e497d30cd4e5f47d23bc20fc44dd6e24f3)
Cannot start service from the command line or a debugger. A Windows Service must first be installed (using installutil.exe) and then started with the ServerExplorer, Windows Services Administrative tool or the NET START command.”
Not really sure, why this happens and what service should the script run. The script has been ran with an admin user and other parts of the script (cleanup, moving files to backup location) ran fine, only the Octopus part has the error mentioned above.
Regards,
Laszlo