laserfiche backup planning whitepaper

12
Building a back-up plan for Laserfiche Rio or Avante Backup Scope In backing up your Laserfiche repository, you will need to back up two different components: The SQL databases that store the folder structure, metadata, and other administrative information about the repository. For an Oracle server, this information will be organized within the schema used by Laserfiche. The volumes that contain the images, text, electronic documents, thumbnails, and word locations associated with the documents. These are stored as normal files within the Windows file system and must remain synchronized with the SQL database. Since additional volumes may be created as the repository is used, be sure to update your backup procedure regularly to account for any new volumes. Backing up your DBMS may require different software than backing up your volumes and index files, although some third-party backup software can back up both SQL databases and Windows files. SQL Databases SQL databases may be backed up in a variety of ways, depending on what software you have and what type of SQL DBMS you have installed. Native SQL Server backup. Oracle and Microsoft SQL Server include a variety of powerful and flexible backup tools. With MSSQL, you can use Enterprise Manager or SQL Management Studio to back up your repository; the help files include step-by- step instructions for these tools. Oracle users should consult their Oracle documentation for detailed information about using the backup tools included with the Oracle server. Third-party software with SQL option. Third-party companies make software that can back up both your volume files and your SQL database files. Some of these products are compatible with both Oracle and MSSQL servers. Detach and copy SQL database. This method may be used with all editions of Microsoft SQL server. Stop the Laserfiche service, without stopping the SQL service, and perform the detach operation on your SQL database through the Microsoft SQL server. Both the detached .MDF and .LDF files need to be copied. To restore the database, re-attach it to your server. Note that if you apply this method to a migrated repository used by Laserfiche Team (MSDE, Microsoft SQL: Personal Edition, or SQL 2005 Express) you will also need to detach and copy the associatedexpansion databases. You should not simply turn off SQL and copy the databases; you must detach them before copying then and then reattach them.

Upload: christopher-wynder

Post on 22-Mar-2017

77 views

Category:

Technology


4 download

TRANSCRIPT

Building a back-up plan for Laserfiche Rio or Avante Backup Scope In backing up your Laserfiche repository, you will need to back up two different components: The SQL databases that store the folder structure, metadata, and other administrative information about the repository. For an Oracle server, this information will be organized within the schema used by Laserfiche. The volumes that contain the images, text, electronic documents, thumbnails, and word locations associated with the documents. These are stored as normal files within the Windows file system and must remain synchronized with the SQL database. Since additional volumes may be created as the repository is used, be sure to update your backup procedure regularly to account for any new volumes. Backing up your DBMS may require different software than backing up your volumes and index files, although some third-party backup software can back up both SQL databases and Windows files. SQL Databases SQL databases may be backed up in a variety of ways, depending on what software you have and what type of SQL DBMS you have installed. Native SQL Server backup. Oracle and Microsoft SQL Server include a variety of powerful and flexible backup tools. With MSSQL, you can use Enterprise Manager or SQL Management Studio to back up your repository; the help files include step-by-step instructions for these tools. Oracle users should consult their Oracle documentation for detailed information about using the backup tools included with the Oracle server. Third-party software with SQL option. Third-party companies make software that can back up both your volume files and your SQL database files. Some of these products are compatible with both Oracle and MSSQL servers. Detach and copy SQL database. This method may be used with all editions of Microsoft SQL server. Stop the Laserfiche service, without stopping the SQL service, and perform the detach operation on your SQL database through the Microsoft SQL server. Both the detached .MDF and .LDF files need to be copied. To restore the database, re-attach it to your server.

Note that if you apply this method to a migrated repository used by Laserfiche Team (MSDE, Microsoft SQL: Personal Edition, or SQL 2005 Express) you will also need to detach and copy the associatedexpansion databases. You should not simply turn off SQL and copy

the databases; you must detach them before copying then and then reattach them.

Manual SQL backup. Microsoft SQL Server is installed with a command-line utility called oSQL, which can be used to back up your MSSQL database. While this utility will work for all versions of MSSQL, it can be complicated and difficult to use. We recommend using Enterprise Manager or SQL Management Studio instead. Microsoft SQL Management Studio Express can be downloaded from the Microsoft Web site. Index Files It is not, strictly speaking, necessary to back up index files; the server can recreate them if they are accidentally lost. However, for large repositories, the re-indexing process can be extremely lengthy, so we recommend that you back up index files whenever possible. They are stored in the SEARCH folder of the repository directory on the same machine as the Laserfiche Full-Text Search Engine. Volumes Volumes are standard Windows directories, and so they may be backed up using whatever method you prefer to use for Windows files. The main consideration when backing up volumes is keeping them synchronized with your SQL database backup files. You can do this by making your volumes temporarily read-only. If your industry is regulated, you may be required to archive your data. In this case, you can use volume rollover to keep your volumes at a manageable size, and export them periodically onto archival media. Exported and archived volumes can be an excellent disaster recovery resource, because they include the database structure and document metadata in XML format. Audit Data If you are using Laserfiche Audit Trail and want to ensure you do not lose audit data, you will need to back up the Audit Trail binary log files. For more information, see Backing Up Your Audit Data. For more information on a specific repository administration topic, return to the repository administration home page. Laserfiche Server Named User Database If you are using Laserfiche Rio or Laserfiche Avante, your Laserfiche Server installation includes a database file that contains your named user license information for that server. This file contains repository named user information for Laserfiche Rio Servers, and all named user and device information for Laserfiche Avante Servers. It is a good idea to back up this file, as otherwise you will need to reallocate your licenses after restoring from backup. For more information, see Backing Up Your Laserfiche Server Named User Database. (This file does not exist for Laserfiche Team and Laserfiche United installations.)

Note: This database is not the same as the license database used by your Laserfiche Rio License Manager or Laserfiche Directory Server, which contains non-repository named user

license allocation along with other license information.

For more information on that license database, see the License Manager documentation or the Laserfiche Directory Server documentation.

Backup Order When performing a database backup, it is critical to synchronize backup data for Laserfiche volumes with the information stored by your DBMS. By keeping volume and database backups consistent, you can ensure a quick and easy recovery. If these backups are not synchronized, the volume may be missing files that are in the database or it may contain files that are no longer in the database. For example, if your volume data was backed up at 8 P.M. while your database was not backed up until 11 P.M., and if changes continued to take place to the repository in between those times, recovery may generate a Laserfiche repository with missing data or data that is not associated with the repository. Documents that were added between the volume backup and the database backup will be reflected in the folder structure, but will be missing all pages and text. It may be impossible to retrieve the contents of these documents. Therefore, it is vital to ensure that backups are synchronized. The only way you can ensure that volume and database backups are synchronized is to perform them when the repository is not in use, through one of several means. You can temporarily disable the volumes, you can temporarily set the Everyone group to read-only, or you can take your repository offline. For information on disabling volumes, see the Disabling a Volume section. Additional Notes on Backups Once you have settled on a backup method, you will need to set up a schedule for running your backups, determine the locations where the backed-up data will be stored, and develop a procedure for testing backups to ensure they can be restored. Differential backups. Differential backups are much quicker and less processor-intensive than full backups, providing a way to get many of the benefits of daily backup without the costs in disk space and computer time. Most backup software allows you the option of running a differential backup, which will back up only the files that have changed since your last full backup. Frequency. You should run a full backup at least once a week, and differential backups at least once per day. If your installation is very large, with thousands of pages added every day, you should strongly consider running differential backups two or more times per day. They may make the difference between losing an hour's work or losing an entire day. When possible, you should run your backups (especially full backups) at times when your system has a relatively light load, such as at night or on weekends. Automation and testing. Most backup solutions will allow for some type of automation, whether through scripting or through built-in automation methods. You should automate the backup process as much aspossible, though automation cannot replace human supervision. Whomever is responsible for backing up your Laserfiche system should check the system frequently to ensure backups are successful, and test to ensure the data can be fully restored. Synchronization. Running backups takes time, and it's possible that your SQL database may be changed while you are backing up your volumes, or vice versa. There are a few different ways to address this problem:

Temporarily disable your volumes while you perform the backup; this will ensure they are not

modified during the process.To fully automate your backup, write a Toolkit script to perform this step.

Temporarily set your Everyone group read-only, which will allow users to continue to view documents, but not to modify them.

Take your repository temporarily offline while running the backup. This will guarantee that no changes are made during the backup process, but makes the repository unavailable for the duration of the backup. It is therefore a good idea to take this step if there is a time (for instance, very early morning) when few or no users will be attempting to access the repository. You can use a WMI script to unmount your repository to automate this step; see Introduction to Windows Management Instrumentation for more information.

Backing Up Your DBMS Database As a part of your database backup plan, you will need to choose a backup tool from a variety of options. For example, you can use a tool provided by your DBMS, a script file, or a third-party backup utility. Most of these tools provide an equivalent amount of functionality. However, you should make sure that the selected tool is properly suited for backing up databases. This section provides instructions for backing up a Microsoft SQL Server database using Enterprise Manager (included with Microsoft SQL Server 2000), SQL Server Management Studio (included with Microsoft SQLServer 2005), or SQL Server Management Studio Express (included with Microsoft SQL Server 2005 Express and available for download from the Microsoft Web site for use with other versions, such as MSDE). You can also use a third-party backup tool or the osql command line utility. (Please note that if you use a third-party backup tool, it must be able to handle open files, as the Laserfiche database files are constantly in use by SQL Server.) For information about backing up your Oracle schema, see Knowledge Base article 1011947 INFO: Backing Up an Oracle Database. For information about backing up a Microsoft SQL Server installation using Transact-SQL commands, see Knowledge Base article 1011948 INFO: Backing Up with Transact-SQL. Reminder: Care must be taken to ensure that DBMS database backup is synchronized with volume data backup. Otherwise, the DBMS database may not be in a state that is consistent with the images, text, electronic files, thumbnails, and word location data stored in a volume. SQLServer Management Studio S QL Management Studio and SQL Management Studio Express contain a native backup tool that can be used to back up your Laserfiche database. SQL Management Studio is installed by default with SQL Server 20XX, and SQL Management Studio Express can be downloaded from the Microsoft Web site. You can also download SQL Management Studio Express from the Microsoft Web site for use with previous versions of Microsoft SQL Server, such as MSDE.

NOTE: Some specific details may be slightly different depending on the version of SQL and

the management studio that you use but the steps should be basically the same.

To back up a database using SQL Server Management Studio

1. Open SQL Server 20XX Management Studio or SQL Server 20XX Management Studio Express. 2. Connect to the SQL server used by Laserfiche. 3. Click the server name to expand the server tree. 4. Expand the Databases item and right-click the database used by Laserfiche. 5. Select Tasks and Back Up. 6. In the Backup Type option, select one of the following:

a. Full. This will perform a full backup of the data in the database. It is recommended that you perform a full backup at least once weekly.

b. Differential. This will perform a backup only of data that has changed since the last full database backup. It is recommended that you perform a differential backup daily, or more often for very high-volume repositories.

7. In the Backup component option, select Database. 8. Optional: In the Description text box, enter a description of the backup. 9. Specify when the backup will expire: 10. To configure the backup to expire after a specific number of days, click After and enter the number of

days. Entering zero (0) configures the backup to never expire. 11. To configure the backup to expire on a specific date, click On and enter a date. 12. Choose the type of backup destination by selecting Disk or Tape. 13. Click the Add button and select the destination for the backup file. 14. Optional: To view or select advanced options, click the Options node. 15. When you have finished configuring, click OK to start the backup process.

Backing Up Your Volumes Volumes store the images, text, electronic files, thumbnails, and word locations that make up your documents and electronic documents. As a result, you should consider volumes to be a critical repository component that needs to be backed up. Reminder: SQL Server database backup should be synchronized with volume data backup.

Typically, volumes contain two types of folder tree hierarchies. One folder tree hierarchy contains images and text. The second contains electronic files; this hierarchy can be identified by a letter "e" that precedes the two-digit folder name (i.e., e00). The number of folder tree hierarchies per volume will vary according to the size of your volume. As your volume grows, so will the number of folder tree hierarchies that branch off the root of the volume's fixed and/or removable path. When backing up your volumes, keep in mind that a volume may store data in more than one location. If you have assigned a fixed and a removable path to a volume, the images, text, and electronic files will be stored in different paths (as specified in the Paths tab of the Volume Properties dialog box). The only way to be sure that all future data stored in the volume will be backed up is by archiving the folder specified by the fixed and/or removable paths and all its subfolders. Only by archiving the volume's entire folder structure can you be sure that all data will be backed up. Backing Up Your Search Index Files As explained in the Repository Layout section, search index files consist of all files located in the SEARCH folder on the Full-Text Search and Indexing Engine computer. A repository's search index files can be rebuilt through the Laserfiche Administration Console. You can back up your search index files manually by stopping the Laserfiche Full-Text Indexing and Search service, copying the SEARCH folder to your backup medium, and then restarting the service. (Do not attempt to manually back up the search catalog while the service is running, as this will result in invalid files.) Alternately, you can use a third-party automatic backup solution that supports Microsoft's Volume Shadow Copy Service (VSS) technology. This will coordinate the process of stopping all catalog actions while the backup takes place and then resuming them once the backup is complete. (During the actual backup, search and indexing will be unavailable, but will become available again automatically once the backup iscomplete.) To use an automatic backup solution with VSS, you must first ensure that the Laserfiche VSS Writer service is running, as it is stopped by default. Backing Up Audit Data Laserfiche Audit Trail stores audit information in binary audit log files on the Laserfiche Server computer. It is important to back up these log files as part of your standard backup procedure to prevent loss of audit data. Audit data is only stored in these logs. Therefore, if the binary audit logs are not backed up, loss of the audit logs will result in permanent loss of all audit data. To preserve your audit data, you should consider your audit logs to be as important to your backup process as volume or database information. By default, a repository's binary audit logs are stored in the AUDIT folder of the repository directory. You can choose to store these files in another location by specifying that location in the Auditing Properties dialog box; see Audit Log Settings for more information. Since Audit Trail will automatically create new logs when the old logs have rolled over, it is important to back up the directories and its contents to ensure that all audit information has been backed up. You can also choose to store the rolled over log files in another location by specifying that location in the Auditing

Properties dialog box mentioned above. Be sure that all audit logs are included in your backup procedure and update your backup plan as necessary when new logs are created or logs are moved. Backing Up Your Laserfiche Server Named User Database If you are using Laserfiche Rio or Laserfiche Avante, your Laserfiche Server installation includes a database file that contains your named user license information for that server. This file contains repository named user information for Laserfiche Rio Servers, and all named user and device information for Laserfiche Avante Servers. It is a good idea to back up this file, as otherwise you will need to reallocate your licenses after restoring from backup. For more information, see Backing Up Your Laserfiche Server Named User Database. (This file does not exist for Laserfiche Team and Laserfiche United installations.) The Laserfiche Server Named User Database is stored in a single file, lfsnu.db, in the Laserfiche Server installation directory (by default, C:\Program Files\Laserfiche\Server). You do not need to stop the Laserfiche Server before copying this file to back it up.

Automating back-up NOTE: This was taken from a user write up in the Laserfiche community “Laserfiche

Answers”

I just wanted to share the backup script/process I created for our environment to assist new users who are looking for solutions/answers on how to do a backup and automate it while leaving the repository open and accessible by end users during the backup process. Process for backup [D2D2T model, will require a backup server/network location to backup data to]: Create a .bat script put the code starting from @echo off statement to the exit statement, modify the code according to your environment, example the SQL server information, the LF server information, the Indexing/Search Server information, your backup server folder path location etc. We have separate VM's for all these but you might just have 1 server running all these instances.

VM1 = LF Server NAME VM2 = SQL SERVER VM3 = SEARCH/INDEX server / On your environment it might be same as VM1. If your SQL server is not on same server as LF server, you will need to get SQL tools to execute sql query from where LF server/repository data exists. I created script to run on LF server that has the repository instead of having script on SQL server to avoid the overhead of having network to network copy for repository data. You will need to install Microsoft® SQL Server® 2008 R2 Command Line Utilities, worked for 2012 sql server as well. http://www.microsoft.com/en-us/download/details.aspx?id=16978 For SQL cmd, you will also need "Microsoft® SQL Server® 2008 R2 Native Client" as well also found on same page/link as above. So the two files required to be installed on LF server (if it does not run/have sql as well on same instance)will be : sqlncli.msi and SqlCmdLnUtils.msi Create a SQL procedure, in our instance I created a SQL Job that would run and be triggered by our BackupAllSQLDBs.sql script, if you need assistance of creating such a SQL job and the appropriate script let me know, I could share that script as well. Basically, before the Robocopy/copy process for repo. files takes place we are making a complete SQL database backup, we are backing the repository dbs (forms,workflow,repo db etc etc all dbs associated with LF), the external tables db we have for our dynamic tables as well as reportserver backup (this is an overkill).

NOTE: You will need read/write access to all the servers/instances for the user running this script, if testing in cmd prompt make sure you run cmd prompt as administrator else this

will not work.

Schedule the bat script using windows task scheduler to run on demand or on fixed schedule, please note the task must be scheduled to run in highest privilage mode and run by the user who has admin rights on all LF instances (for example admin on sql server, backup server, indexing server, LF repository server etc. etc.). In an Windows domain run it as one of the Domain Admin accounts. If you need help with regards to how to setup a windows scheduled task check out

http://windows.microsoft.com/en-ca/windows-vista/automate-tasks-with-task-scheduler-from-windows-vista-inside-out PS: copy and paste in a text file and rename the .txt file extension to .bat, if you are not sure how to create a batch/bat file. Breakdown of SCRIPT: 1. Sets the Vol_flags to 39 (read only state) on the SQL server. 38 is read-write state of a volume. 2. Stops and starts the LF server (setting state to read only on sql alone will not do anything unless LF server is aware, also this makes sure that clients connections are reset). 3. The Indexing/Search server needs to be in stop state (else you will not be able to copy the files from the SEARCH folder). The users can still access the repository but will not be able to search or import/delete data. 5. Once indexing/search is stopped we are executing a sql script that backups up all the SQL datases assoicated with LF instance to our backup server. 4. Robocopy comes by default on most windows server instances after 2003 windows era, and the flags are set here to only copy newer files, so next time it runs the backup will be faster as it will only copy newer/modified files only. 5. After copy has finished the SQL vol_flags will be set to read-write state and the services/server of LF restarted. You can now backup the data dumped to your backup server to offsite location or on a tape if you wish. We use the D2D2T backup model.

Bat SCRIPT below start copying from @echo off statement all the way to the exit statement. @echo off sqlcmd -S VM2 -Q "update [YourSQLREPOSITORYDB].[dbo].[vol] set vol_flags=39 where vol_flags=38" -o C:\LFScripts\logs\SQL_logreadmode.txt timeout /T 5 sc \\VM1.YourDomain stop Lfs > C:\LFScripts\logs\LFServerReadOnlyStop.txt timeout /T 5 sc \\VM3.Yourdomain stop LfFTSrv > C:\LFScripts\logs\LFSearchReadOnlyStop.txt timeout /T 5 sc \\VM1.YourDomain start Lfs > C:\LFScripts\logs\LFServerReadOnlyStart.txt timeout /T 5 sqlcmd -S VM2 -i C:\LFScripts\BackupAllSQLDBs.sql -o C:\LFScripts\logs\SQL_logbackupstatus.txt timeout /T 5 robocopy D:\YourLaserficheRepoVolumePath

\\YourBackupServerPath\LFBackups\RepoBackups /copyall /e /r:1 /w:30 /dcopy:t /xo /log:C:\LFScripts\logs\LFRepoCopy.txt /np /fp /tee timeout /T 5 sqlcmd -S VM2 -Q "update [YourSQLREPOSITORYDB].[dbo].[vol] set vol_flags=38 where vol_flags=39" -o C:\LFScripts\logs\SQL_logWritemode.txt timeout /T 5 sc \\VM3.Yourdomain start LfFTSrv > C:\LFScripts\logs\LFSearchReadOnlyStart.txt timeout /T 5 sc \\VM1.YourDomain stop Lfs > C:\LFScripts\logs\LFServerWriteOnlyStop.txt timeout /T 5 sc \\VM1.YourDomain start Lfs > C:\LFScripts\logs\LFServerWriteOnlyStart.txt timeout /T 5 exit

Failover and High availability Failover clustering is only supported as part of Laserfiche Rio deployment, through Laserfiche Directory Server 10, though it is not related to the separate product, Laserfiche Distributed Computing Cluster. It uses the Windows Failover Clustering feature. For information on configuring Directory Server failover clustering, please read KB1013718. Failover clustering is a clustering model that brings up a new machine when the current instance goes down. This is in contrast to the Distributed Computing Cluster product, which is a load balancing cluster that distributes the load of OCR to multiple machines. For example, if you have Directory Server installed on Machine1, and the Service for Directory Server goes down, a correctly configured failover cluster will bring up Machine2 in your cluster with Directory Server, pointing to the same licensing database. Furthermore, if configured correctly, they will be reachable through the same name so that no relicensing is necessary. Most of this function is related to Server set-up not LF set-up For Laserfiche Avante customers, failover requires having two fully licenced servers. The failover is then triggered manually by de-activating the first Laserfiche installation and “re-activating” the second server. Laserfiche Rio failover clustering Directory Server 10 Configuration Information for Windows Failover Clustering. Summary

This article covers configuration information for the Windows Failover Clustering feature to function with the Laserfiche Directory Server failover cluster support. Windows Server Configuration

1. Install the Windows Failover Clustering feature on all computers in the potential cluster. Make sure to include the cluster management tools.

2. Open Windows Failover Cluster Manager and create a new cluster. 1. Include all the appropriate computers in the cluster. 2. Under Nodes, verify that all the appropriate computers are listed.

3. Install Laserfiche Directory Server with the Laserfiche Directory Server Failover Cluster Support component on all computers in the cluster.

4. Using Windows Failover cluster Manager, under Roles, create and configure a new role. 1. In the wizard, on the Select Role step, select Other Server. 2. On the Client Access Point step, specify a cluster role name. 3. When prompted to select a Resource Type, choose Laserfiche Directory Service Resource.

5. Back in the Failover Cluster Manager, right-click on the newly created role and view the Properties. 1. On the General tab, in the Preferred Owners section, select all the nodes. 2. On the Failover tab, adjust failover settings as appropriate.

6. Check that Resource properties for the role are configured. 1. Select the Role. 2. At the bottom of Failover Cluster Manager, click the Resources tab. 3. Under Server Name, right-click on the Server name (the "Client Access Point") and

click Properties. 4. On the Dependencies tab, take note of the IP address value. Then close the properties dialog

box. 5. Under Other Resources, right-click on Laserfiche Directory Service Resource, and

click Properties. 6. On the Dependencies tab, take note of the Resource name. 7. Start the cluster. Right-click on Laserfiche Directory Service Resource and click Bring Online.

Note: You may need to stop all Directory Server services before starting the cluster.

Directory Server Configuration

1. View the Laserfiche Directory Server Administration site. 2. On the Settings tab, enable the Enable Cluster (this action cannot be undone) option. 3. Next to Cluster Role Name, specify the cluster role created in the previous section. 4. Next to Cluster Fingerprint, specify the hardware fingerprint of the computer hosting the licensing

database. 5. Click Add new host to cluster and add a cluster node. Repeat as necessary for additional nodes.

Note: The licensing database connections must be configured separately for each node. Administrators should create and activate the Directory Server database on one node,

then attach the database to the other Directory Server nodes.

Compatibility Information Directory Server Failover Cluster Support requires Microsoft Windows Server 2008 R2, Microsoft Windows Server 2012, or Microsoft Windows Server 2012 R2. In a Windows Server 2012-based failover cluster, you may need to install the following Microsoft update: https://support.microsoft.com/en-us/kb/2803748