I would like to backup Adaxes on a regular basis with a powershell script. I have a script that works well but I need to run it as a Scheduled Task.
During the backup the Adaxes service is restarted. I don't want to give the Adaxes service account administrator permissions to do this so I created a Group Policy that gave the service account permissions to restart the service.
The backup appears to work most way through but still fails with the following error:
[7/23/2020 5:24:29 PM] Error: Softerra.Adaxes.BackupRestore.BackupRestoreException: Failed to back up the service configuration file due to the following error: Access is denied. ---> Softerra.Adaxes.Adsi.DirectoryComException: Access is denied.
at Softerra.Adaxes.Utils.Impersonator.ImpersonationContext..ctor(NetworkCredential credential, LOGON32_LOGON logonType, LOGON32_PROVIDER logonProvider, Boolean loadProfile, Boolean suppressFlowIdentity)
at Softerra.Adaxes.Utils.Impersonator.DefaultImpersonator.Impersonate(NetworkCredential credential, LOGON32_LOGON logonType, LOGON32_PROVIDER logonProvider, Boolean loadProfile, Boolean suppressFlowIdentity)
at Softerra.Adaxes.BackupRestore.Processors.ServiceConfigFileProcessor.ReadServiceConfig(BackupRestoreContext context)
at Softerra.Adaxes.BackupRestore.Processors.ServiceConfigFileProcessor.BackupServiceConfig(String filepath, BackupRestoreContext context)
at Softerra.Adaxes.BackupRestore.Processors.ServiceConfigFileProcessor.Backup(BackupRestoreContext context)
--- End of inner exception stack trace ---
at Softerra.Adaxes.BackupRestore.Processors.ServiceConfigFileProcessor.Backup(BackupRestoreContext context)
at Softerra.Adaxes.BackupRestore.BackupCommandBase.Backup(BackupRestoreContext context)
[7/23/2020 5:24:29 PM] Info: Starting system service 'Softerra Adaxes Service'.
[7/23/2020 5:24:29 PM] Info: System service 'Softerra Adaxes Service' started.
What additional permissions would I need to give the service account to perform a backup?