Administer
Troubleshooting
Fix common problems with setup, the WebView2 Runtime, restarts, the services, signing in, backups and restores, and find the logs.
Where to find logs
| Log | Where |
|---|---|
| SANAD Backup log | %ProgramData%\Sanad\logs\sanad-YYYYMMDD.log, written by both services, the desktop app and the command-line tool. |
| Unexpected errors | %ProgramData%\Sanad\logs\crashes\ |
| Setup log | Your %TEMP% folder, or the file named with /log. The failure page of setup links to it. |
| One backup run | The run's details on History, including the Delivery table, and, while you watch a run you started, the run page's Log Output. |
A new SANAD Backup log file starts each day. A file stops growing at 10 MB, so later entries that day are not written. Programs that run at the same time each write their own file that day, with _001, _002… added to the name, so read every file of the day. Seven files are kept, these included.
Setup and installation
Windows SmartScreen blocks the setup program
An unsigned release can trigger SmartScreen. Check the file's SHA-256 checksum against the Download page first (see Install). If it matches, choose More info, then Run anyway.
Setup refuses to start
- "SANAD Backup requires Windows 10 (1809+) or Windows 11": the computer runs an older version of Windows. See System requirements.
- A message that a newer version of SANAD Backup is already installed: setup never replaces a newer version. To go back, see Upgrade and uninstall.
The WebView2 Runtime could not be installed
Setup downloads the runtime from Microsoft when it is missing; without internet access that fails, and setup stops before it installs SANAD Backup. Install Microsoft's Evergreen Standalone Installer (x64) from the WebView2 download page, then run SANAD Backup setup again. On a server that never runs the desktop app, run setup with SKIPWEBVIEW2=1 instead; the desktop app then cannot start until the runtime is installed.
Setup asks for a restart, or returns exit code 3010
A file could not be replaced while it was in use, usually because the desktop app did not close when setup asked it to, or a Sanad.CLI command was still running. SANAD Backup is installed; restart the computer to finish. In unattended installs, always pass /norestart so the computer never restarts by itself.
Files in use
During an upgrade, setup lists the applications that use its files. Choose Close the applications and try to restart them, or close them yourself first. Setup never ends the desktop app by force; if you keep it open, a restart is needed afterwards.
Exit code 1618
Another installation was running. Wait for it to finish, then run setup again.
Error 1921 during an upgrade
A SANAD Backup service did not stop within Windows' 30-second limit, usually because a backup was still running. Choose Retry when the backup has finished. In a quiet install, the upgrade is rolled back; run it again at a quieter time. After a rolled-back upgrade, check the backup service with sc.exe query Sanad and start it with sc.exe start Sanad if it is stopped: until then scheduled backups run only while the desktop app is open.
Services
A service does not start
Check both services from an administrator prompt:
sc.exe query Sanad
sc.exe query SanadWeb
Start a stopped service with sc.exe start Sanad or sc.exe start SanadWeb, then read the cause in the SANAD Backup log (not in the crashes folder).
The most common cause for SanadWeb is a port that another program already uses. During installation this can fail setup with error 1920 and roll it back; an installed service can keep trying again about once a minute. Find the program that holds the port:
netstat -ano | findstr :5080
The last number is the process ID; look it up in Task Manager. Stop that program, or install the next version with another port, for example WEBURLS=http://localhost:5090.
When the scheduler check of /health is Degraded, no backup service owns the schedules: start the Sanad service. See Web dashboard.
The log warns that it failed to determine the HTTPS port
On the default plain-HTTP address this warning is expected and harmless: the dashboard has no HTTPS address to redirect to.
Signing in
The web dashboard refuses the initial password
This is intended: the installed dashboard never accepts it. Set the password in the desktop app run as administrator, or with Sanad.CLI user set-password admin in an administrator prompt on the server, then sign in with the new password. See First sign-in.
Signing in from another computer returns to the sign-in page
Over plain HTTP, browsers keep the dashboard's Secure session cookie only for localhost, 127.0.0.1 and [::1]. Serve the dashboard over HTTPS or behind a TLS reverse proxy — see Web dashboard.
Two-factor problems
- "Two-factor authentication code required.": type the code from your authenticator app in Authenticator code.
- Lost the authenticator? Use an unused recovery code. Another administrator can turn off Require it for administrators in Settings > Security before using Reset 2FA. If nobody can sign in, open Terminal as administrator on the SANAD server and run
Sanad.CLI security two-factor off. Check that the printed store path is the server's existing database; if it is wrong or missing, follow the command's instructions to select the correct store. It turns two-factor off, preserves enrolments and audits the recovery. Sign in with the password, repair the authenticator, then turn two-factor back on. - Signed out after two-factor was turned on? Sessions without a verified code end within about two minutes for accounts with an enabled authenticator, including remembered sessions. Sign in again with the password and a code.
- "Saved, but the audit entry could not be written.": the security settings did save. Check database availability and the logs before making another change.
"This account has been disabled."
An administrator disabled the account. Ask one to choose Enable on the Users page.
A forgotten password
Set a new one on the server with the command-line tool, in an administrator window — see First sign-in.
An invitation shows "No link yet"
The invitation was created before the dashboard address for links was set, so it has no link. Save the address in Settings → Dashboard address (it must start with https://), then choose Resend in the invitation's row on the Users page. See Invite a user.
An invitation email failed
The invitation's row says Delivery failed, and the dialog gave the mail server's reason. Check the outgoing mail server on Settings → Email Notifications → Open email settings, and use Send test email there. Then choose Resend, or give the person the link the dialog showed (choose Resend to get a new one: the link is shown only once).
An invitation link does not work
The page that opens says why: the invitation was already used, has expired (after seven days) or was withdrawn (Revoke). A link replaced by Resend is "not valid". Ask an administrator for a new link. If you are signed in as another account, the page asks you to sign out first, then open the link again.
The desktop app
- Errors when saving, or "access denied": next to the installed services the desktop app must run as administrator. Right-click SANAD Backup in the Start menu and choose Run as administrator.
- "Your session ended because the account's password was changed or the account was changed elsewhere." Someone changed or removed the account (its password, role or status), or SANAD Backup could not confirm it. Sign in again.
- The app does not open on a server: the WebView2 Runtime is probably missing (see above).
Backups
A native backup cannot write to the staging folder
The run reports that SQL Server's service account cannot write to the staging folder. Give that account Modify permission on it, from an administrator prompt — for the default instance:
icacls "%ProgramData%\Sanad\backups\staging" /grant "NT SERVICE\MSSQLSERVER:(OI)(CI)M"
For a named instance, the account is NT SERVICE\MSSQL$ followed by the instance name. If SQL Server runs on another computer, native backups cannot use this folder: use the Script output format instead (see Connections).
Scheduled backups fail, but Test or Run Now works
Scheduled backups run in the backup service as its account (Local System by default), while a test or Run Now in the desktop app runs as you. With Windows Authentication, SQL Server sees the service as NT AUTHORITY\SYSTEM, which by default cannot open your databases. For an administrator, the Jobs page asks the backup service about every enabled job and warns on its card, before the first scheduled run, "Scheduled backups will fail", naming the databases and giving the fix under How to fix it (in the web dashboard, and in the desktop app when it runs as administrator, as it should next to the services). A run that failed says so in the history:
The SQL Server login 'NT AUTHORITY\SYSTEM' cannot open database 'Sales', so it cannot back it up.
Give that login backup rights on each database the job backs up, as a SQL Server administrator (in SQL Server Management Studio, or with sqlcmd -S . -E):
USE [Sales];
CREATE USER [NT AUTHORITY\SYSTEM] FOR LOGIN [NT AUTHORITY\SYSTEM];
ALTER ROLE db_backupoperator ADD MEMBER [NT AUTHORITY\SYSTEM];
Repeat it for every database of the job, and for a database you add to it later. A job with the Script output format reads the data instead: add the user to db_datareader and GRANT VIEW DEFINITION TO [NT AUTHORITY\SYSTEM]; in that database. A restore started from the web dashboard runs as that account too and needs more: the dbcreator server role, or sysadmin. Or use SQL Server Authentication for the connection. Also check that the service account can reach network shares and key files. A destination's Test result names the computer and account it ran as.
A transaction-log backup fails
The database probably uses the simple recovery model. Log backups need the full or bulk-logged model, and a full backup first.
A run is Failed although SQL Server's backup worked
The backups reached no destination. Open the run on History and read the Delivery table; then edit the job and Test the destination. The test names one cause, such as Sign-in rejected, Folder missing or No write permission.
A job card shows a badge
- Retention needs attention: the nightly clean-up could not run, could not finish or could not delete some files, or none of the job's backups were found where SANAD Backup had delivered them. The badge always reads "Retention needs attention"; point at it to see the reason.
- Reconnect needed: Google Drive stopped accepting the saved connection, or the saved connection cannot be read on this computer. Edit the destination, choose Reconnect and save the job.
- unencrypted, certificate not verified, host key not confirmed: the connection to that destination is not fully protected. See Destinations.
Restores
- The restore is refused because a backup is missing. Retention or someone removed a file the chain needs. The message names the missing backups and the latest point the remaining ones reach; choose that point or another chain. The target database was not touched.
- The restore fails because a file cannot be read. The usual cause is a backup encrypted with an earlier password: enter it as Decryption password.
- The restore succeeded with a note. SANAD Backup had to recover the database itself, or could not confirm its state; the note says which. See Restore.
The command-line tool
- "Sanad.CLI" is not recognised. The window was opened before the installation. Open a new one, or use
"C:\Program Files\Sanad\cli\Sanad.CLI.exe". - Exit code 3 from user set-password. The window does not run as administrator. Open Command Prompt or Terminal with Run as administrator.
- Errors opening SANAD Backup's data. Run the tool in an administrator window on the server. See Command line.