Administer

Upgrade and uninstall

Upgrade SANAD Backup in place, repair it, go back to an earlier version, uninstall it, and know what stays on the computer.

Before you upgrade

  • Choose a time when no backup or restore is running. The upgrade stops both SANAD Backup services and starts them again.
  • Keep an independent copy of %ProgramData%\Sanad before a major upgrade. SANAD Backup makes its own safety copy of its database (below), but that is not a substitute for your own backup.
  • Keep your web dashboard settings in C:\Program Files\Sanad\web\appsettings.Production.json, not in appsettings.json: an upgrade replaces every file SANAD Backup installed, appsettings.json included.

Upgrade

Run the newer SanadSetup-<version>.exe, interactively or unattended:

start /wait SanadSetup-<version>.exe /quiet /norestart

What happens:

  • Your data in %ProgramData%\Sanad — connections, jobs, history, settings and the backup catalogue — stays, and so do the backups at their destinations.
  • The values of WEBURLS and SERVICEACCOUNT from the previous installation are kept unless you pass new ones.
  • Both services are stopped, re-created from the new version and started again. Changes you made to them with sc.exe or the Services console are undone; choose the account with SERVICEACCOUNT instead.
  • If the desktop app is open, setup closes it for you, as if you closed its window, and waits up to 30 seconds. Save your work first. Setup never ends the app by force; if the app keeps files in use, the update finishes after a restart (exit code 3010).
  • An upgrade that fails is rolled back to the installed version.

Always upgrade with the setup program or the MSI. Do not copy files into C:\Program Files\Sanad yourself: the next upgrade or repair puts the package's files back.

An older setup program refuses to replace a newer installation: it says that a newer version of SANAD Backup is already installed, and names that version. To go back, follow the steps below.

Automatic updates

SANAD Backup updates itself. Every day at 04:00 UTC the backup service asks this website for a newer release. When there is one, it downloads the installer, checks that the SANAD Backup publisher signed it (it refuses anything else), and installs it as an upgrade (above), while no backup is running; a running backup postpones the update to the next day.

  • Settings > Updates, in the web dashboard or the desktop app, shows the installed version, and Check for updates asks for a newer one. Install now asks the backup service to install it at once.
  • An open desktop app closes itself when the update starts: it shows "Installing SANAD Backup …" for a few seconds, then closes so the update can replace it. Open it again a few minutes later.
  • The server needs HTTPS access to sanad.khamis.work and to GitHub, where the installers are (github.com and the download servers it sends them from).
  • To turn automatic updates off, create C:\Program Files\Sanad\service\appsettings.Production.json with { "Update": { "Enabled": false } } and restart the Sanad service. Upgrades keep the file.
  • Versions 1.26.1019.2244 and 1.26.1021.2204 do not look for updates. Install the next version by hand once; it updates itself from then on.

The database during an upgrade

When the new version first starts, it updates the structure of SANAD Backup's database. Before it changes anything, it copies the database to %ProgramData%\Sanad\backups\db\, as pre-migration-<from>-<time>.db: <from> names the database version it upgraded from, and <time> is the UTC time of the copy. It keeps the five newest copies, and makes one only when the upgrade actually changes the database. If the copy cannot be written (for example on a full disk), the log says so and the update goes ahead without it.

A rolled-back upgrade restores the program files, not the database. If the new version had already updated the database, restore the copy as described next.

Go back to the previous version

  1. Stop both services from an administrator prompt:

    sc.exe stop SanadWeb
    sc.exe stop Sanad
    

    Close the desktop app too.

  2. If the newer version updated the database, list the copies (newest first) and restore the newest one, deleting the two journal files beside the database:

    dir "%ProgramData%\Sanad\backups\db\pre-migration-*.db" /O-N
    copy /Y "%ProgramData%\Sanad\backups\db\pre-migration-<from>-<time>.db" "%ProgramData%\Sanad\sanad.db"
    del "%ProgramData%\Sanad\sanad.db-wal" "%ProgramData%\Sanad\sanad.db-shm" 2>nul
    
  3. Uninstall SANAD Backup (below). Your data stays.

  4. Run the older SanadSetup-<version>.exe with the same WEBURLS and SERVICEACCOUNT values you used before. It starts both services.

Repair

Repair puts the program files of the installed version back, for example after files were deleted. It keeps your data.

  • In Control Panel > Programs and Features, select SANAD Backup and choose Repair, or

  • run the setup program of the same version with /repair:

    SanadSetup-<version>.exe /repair
    

Uninstall

SANAD Backup appears once in the list of installed apps. Remove it from Settings > Apps (Installed apps on Windows 11, Apps & features on Windows 10), or from Control Panel > Programs and Features. Administrators can also run msiexec /x with the MSI file of the installed version.

Running the setup program with /uninstall does nothing; use one of the ways above.

What uninstall removes and what stays

Removed Stays
The program files in C:\Program Files\Sanad %ProgramData%\Sanad: the database, settings, logs and backup catalogue
Both services, Sanad and SanadWeb C:\Program Files\Sanad\web\appsettings.Production.json, if you created it, and its folder
The Start menu shortcut The Microsoft Edge WebView2 Runtime, which other applications use
The command-line tool's PATH entry Your backups at their destinations
The remembered WEBURLS and SERVICEACCOUNT values

A later installation finds the kept data and uses it again; it starts with the default WEBURLS and SERVICEACCOUNT unless you pass other values.

Removing everything

To remove SANAD Backup completely, uninstall it, then delete %ProgramData%\Sanad by hand. This cannot be undone: the folder holds the record of where every backup is, and the stored passwords, including the encryption passwords of your jobs. Backups at the destinations are never deleted by an uninstall; remove them yourself if you no longer need them.