Note: This is an internal document that should not be public-facing. It contains instructions that could cause significant errors with the software if not executed properly. It has currently only been tested on the restore from a v188.8.131.52 backup to v184.108.40.206.
AuthAnvil Password Server customer is trying to use a v1.5 or v1.6 backup file (.psb) that is 21KB in file size. It is failing to properly restore when using the next version of AuthAnvil Password Server.
In AuthAnvil Password Server v1.5 and v1.6 the AAPSBackup.exe tool will appear to succeed even when it does not detect an AuthAnvilPasswordServer database in the defined SQL instance. This will create a 21KB backup file (.psb) that only contains the necessary certificate data from the web.config file, but is missing all of the data needed to restore the SQL database in the new install.
Trying to restore the next software version through the installer will fail because the backup missing all necessary database information.
The only way to restore the AuthAnvil Password Server with a 21KB backup is by using a SQL backup. If the customer does not have their SQL instance backed up in any form then the database information is gone and the server will need to be installed fresh.
Assuming both the 21KB backup and the SQL backup are present (raw .mdf and .ldf database files are acceptable) here is the general process for restoring the software and database functionality.
1) Restore AuthAnvil Password Server from the 21KB backup file using the installer for the same version they took the initial backup from. Select New Install and Restore Data in the installer.
2) Restore the SQL database (copy .mdf and .ldf over existing data files or restore from SQL .bak file)
3) Remove AAPSUser ownership of AAPSUser Schema by setting ownership for it on dbo user
- AuthAnvilPasswordServer -> Security -> Users -> Double-click dbo
- Check the box for ownership of AAPSUser schema
4) Remove AAPSUser from the AuthAnvilPasswordServer database users:
- AuthAnvilPasswordServer -> Security -> Users -> dbo
5) Recreate user mapping:
- Security -> Logins -> Double-click AAPSUser
- Under User Mapping check "AuthAnvilPasswordServer" with default schema AAPSUser
- Under "Database role membership" at the bottom check db_datareader, db_datawriter, db_ddladmin, db_owner
6) Recycle AAPS application pool
At this point the software is fully functional and the customer can run an upgrade to the latest version, or they can take a proper backup and restore to the new version.