Backup
Scifeon does not provide an on-premises backup systems, but we provide the following best practices:
- We recommend taking regular backups of the database according to your company policy.
- The only relevant application file to backup is the
appsettings.jsonfile. - Test your backup before moving into production, i.e. after the backup mechanism has been set up.
Application backup
Section titled “Application backup”Backup the application files by making a copy of the application files folder with a meaningful name, e.g. by appending the current date. For example, if the application files are placed in the folder c:\inetpub\scifeon\dev, make a copy in the folder c:\inetpub\scifeon\dev_YYYYMMDD.
Database backup
Section titled “Database backup”Backup the database Scifeon_ (change this) to the folder c:\backup by running the following script:
DECLARE @name VARCHAR(50) -- database nameDECLARE @path VARCHAR(256) -- path for backup filesDECLARE @fileName VARCHAR(256) -- filename for backupDECLARE @fileDate VARCHAR(20) -- used for file name
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)
-- specify database backup directorySET @path = 'C:\Backup\'-- specify database nameSET @name = 'Scifeon_'
SET @fileName = @path + @name + '_' + @fileDate + '.BAK'BACKUP DATABASE @name TO DISK = @fileNameThe backup above can be restored with the following script:
DECLARE @name VARCHAR(50) -- database nameDECLARE @path VARCHAR(256) -- path for backup filesDECLARE @fileName VARCHAR(256) -- filename for backupDECLARE @fileDate VARCHAR(20) -- used for file name
-- specify database backup directorySET @path = 'C:\Backup\'-- specify backup database nameSET @fromName = 'Scifeon_'-- specify restore database nameSET @toName = 'Scifeon_'-- specify backup date (look in the backup path for the correct format)SET @fileDate = ''
SET @fileName = @path + @fromName + '_' + @fileDate + '.BAK'RESTORE DATABASE @toName FROM DISK = @fileName WITH REPLACEFor more advanced ways to backup SQL Server databases, please read Microsoft Docs.
Verifying backup
Section titled “Verifying backup”- Restore the backup into a completely new, empty database.
- Compare data between the backed up database and the new database with the compare script.
- Edit the
appsettings.jsonof an existing Scifeon instance to use the new database and start Scifeon. Verify that everything works. - Compare data between the backed up database and the new database with the compare script. This is to verify that by running Scifeon the data have not changed.
The compare script is generated here: …
Policies
Section titled “Policies”Follow your company backup policy, if you do not have such, we recommend backing up the database at least once a week.