Backup and restore¶
As with all web applications, Permission Assist should be backed up on a regular basis. The parts of the application that should be backed up are:
- Database -- the SQL Server database that contains all of the data for Permission Assist
- Configuration files -- the
.configfiles that are specific to your installation
We recommend following your standard practice for backing up systems. If you don't have a standard practice, the following information provides a process for backing up and recovering the database and files.
On this page:
Database backup¶
When Permission Assist was installed, a Microsoft SQL Server database was created to hold all Permission Assist data. The default connection string uses the database PermissionAssist; the following examples will use this name as well. Replace PermissionAssist with the name of your specific database if it's something other than PermissionAssist.
When backing up the database, we recommend using your standard best practices for backing up a SQL database.
Otherwise, you can use a single command to back up the database, which you may need to run as an administrator if you have UAC enabled in Windows.
osql -S .\PermissionAssist -E -Q "BACKUP DATABASE [PermissionAssist] TO DISK=N'C:\Backups\PermissionAssist.bak' WITH FORMAT"
You can customize the path on disk as needed. To run this command on a regular basis, set up a scheduled task using the Task Scheduler.
Database restore¶
If you backed up your database using the command above, then you can use the following command to restore the database:
osql -S .\PermissionAssist -E -Q "RESTORE DATABASE [PermissionAssist] FROM DISK = 'C:\Backups\PermissionAssist.bak' WITH FILE = 1, NOUNLOAD, STATS = 10"
Config file backup¶
You should also create backups of the configuration files in case you need to restore them in the future. The most important files to back up are listed below:
- Sycorr.PermissionAssist.Database.Migrator.exe.config -- typically located in the folder containing your Database Migrator file (for example,
[Drive]:...\PermissionAssist\Install files\Sycorr.PermissionAssist.Database.Migrator-x.x.xx) - Sycorr.PermissionAssist.Jobs.Runner.exe.config -- typically located in the folder containing your Permission Assist service files (for example,
[Drive]:\PermissionAssist\Service) - Web.config -- typically located in the folder containing your Permission Assist web application files (for example,
[Drive]:\PermissionAssist\Site)
Config file restore¶
To restore configuration files, simply copy the configuration files back into their original location.