{"id":117,"date":"2009-05-11T17:47:08","date_gmt":"2009-05-11T21:47:08","guid":{"rendered":"http:\/\/www.dev-notes.com\/blog\/2009\/05\/11\/crystal-reports-server-xi-backup-and-recovery-step-by-step\/"},"modified":"2009-05-11T17:47:08","modified_gmt":"2009-05-11T21:47:08","slug":"crystal-reports-server-xi-backup-and-recovery-step-by-step","status":"publish","type":"post","link":"https:\/\/www.dev-notes.com\/blog\/2009\/05\/11\/crystal-reports-server-xi-backup-and-recovery-step-by-step\/","title":{"rendered":"Crystal Reports Server XI backup and recovery step-by-step"},"content":{"rendered":"<p>I am running Crystal Reports Server XI with a SQL Server 2000 database.  These two components are running on two different servers, but it should not change the procedures below much.<\/p>\n<p><b>Procedures for Scheduled Daily Backups<\/b><\/p>\n<p>On the database server, I set up a batch file that utilizes SQL Server 2000&#8217;s osql command to perform backup of the Central Management Server (CMS) database; I scheduled it to run nightly.  The content of the batch file is as follows.  Note that you should substitute in your server name, user name, password, and file paths.  Also, note the copy command makes a copy of the backup file to another server, which is highly recommended; how good is a backup if the system failure is caused by a hard disk burning out and the backup resides on the same hard disk, right?<\/p>\n<pre class=\"code\">\nosql -S [serverHostName] -U [databaseUsername] -P [myPassword] -Q \"begin declare @CMSBackupFile varchar(255) set @CMSBackupFile='C:cms.bak' backup database [cmsDatabaseName] to disk = @CMSBackupFile end\"\nxcopy.exe \/c \/d \/e \/h \/r \/y C:cms.bak \\anotherServerbackupscms\n<\/pre>\n<p>On the Crystal Reports Server XI server, there is a folder that stores the actual reports; Crystal Reports Server XI refers to this folder as the Input File Repository.  By default, it is located at C:Program FilesBusiness ObjectsBusinessObjects Enterprise 11FileStoreInput, which is what the example below will make use.  The example is another batch file, scheduled to run nightly, that makes a backup copy of the reports to another server.<\/p>\n<pre class=\"code\">\nxcopy.exe \/c \/d \/e \/h \/r \/y \"C:Program FilesBusiness ObjectsBusinessObjects Enterprise 11FileStoreInput*.*\" \\anotherServerbackupsfileStore\n<\/pre>\n<p><b>Restore Procedures<\/b><\/p>\n<p>My plan to deal with the unthinkable is listed below.<\/p>\n<p>For the SQL Server, if needed, install SQL Server and then copy the backup file (&#8220;cms.bak&#8221; in this example) to the new database server.  Next, issue the following two osql commands in the command prompt to create\/recreate the CMS database.<\/p>\n<pre class=\"code\">\nosql -S [newServerHostName] -U [databaseUsername] -P [myPassword] -Q \"drop database [cmsDatabaseName]\"\nosql -S [newServerHostName] -U [databaseUsername] -P [myPassword] -Q \"restore database [cmsDatabaseName] from disk='c:cms.bak'\"\n<\/pre>\n<p>Next, we will likely find an orphaned user in the restored database; this can be seen in SQL Server Enterprise Manager&#8217;s &#8220;Users&#8221; section for the CMS database; you will see an user without &#8220;Login Name&#8221;.  To fix this, run the following osql command in the command prompt.<\/p>\n<pre class=\"code\">\nosql -S [newServerHostName] -U [databaseUsername] -P [myPassword] -d [cmsDatabaseName] -Q \"exec sp_change_users_login 'Auto_Fix', '[crystalReportsDatabaseUser]', NULL, '[passwordHere]'\"\n<\/pre>\n<p>For the Crystal Reports Server XI reports, if needed, they can be copied directly from your backup to the new Input File Repository location.<\/p>\n<p>When you have completed the restore, you may wish to restart the CMS and Input File Repository services in the Central Configuration Manager.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article notes my backup scripts and the plan for recovery for my Crystal Reports Server XI and its SQL Server 2000 database.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,39],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-crystal-reports-server","category-sql-server"],"_links":{"self":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-notes.com\/blog\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}