Here is some field notes from configuring backup of OCS. These steps should provide information about how to complete basic backup of your OCS installation, including configuration and databases.
First we look at the configuration on the front end server. In this scenario we will complete backup of Front end and mediation server from the front end server. If you have additional servers they are easily added to this script.
- First Create an folder on the C: drive of the FE server called “Backup”
- Browse to the new folder “c:Backup”
- Create a new .bat file called “OCS-backup.bat”
- Edit the .bat file
—– Content of OCS-backup.bat——–
“C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:machine /configfile:c:backup[name of front-end server]-
“C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:machine /configfile:c:backup[name of mediation server]
“C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:pool /configfile:c:backup[poolname]
“C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:global /configfile:c:backup[poolname]
“C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:global,pool /configfile:c:backup[poolname]-GlobalAndPool.xml /poolname:
————END————-
Please note that the pool name Backup of the Access Edge server is very similar. It should be backed up, however it is not needed every day, depending on your company’s security requirements. Backing up configuration every time a change is applied to the server is a very good idea. The command is the same as for the Mediation and Front End server: ——-Access Edge Backup——– “C:Program FilesCommon FilesMicrosoft Office Communications Server 2007lcscmd” /config /action:export /level:machine /configfile:c:backup Then we move to backing up SQL Databases: If you have a backup application that supports SQL 2005, its possible to backup the databases directly. If you are left without this tool, there are other ways. In this case i will describe the procedure for the Standard edition of OCS deployments, and there for assume that OCS is using an SQL 2005 Express. First you need the Microsoft SQL Server Management Studio Express
This enables you to view and generate SQL scripts. For this deployment, the below scripts will work: ———–RTC-backup.sql———– ———–RTCconfig-backup.sql———– ———–RTCdyn-backup.sql———–
———–OCS-sql-backup.bat———– sqlcmd -S .rtc -i c:backuprtc-backup.sql sqlcmd -S .rtc -i c:backuprtcconfig-backup.sql sqlcmd -S .rtc -i c:backuprtcdyn-backup.sql —————END————– Now you have 2 .bat files (OCS-sql-backup.bat & OCS-backup.bat) and all that is left is to create a couple of Scheduled Task to run these every day, and configure your file level backup to take backup of the c:Backup folder. Regards, Rasmus Hald
——–END——–
BACKUP DATABASE [rtc] TO DISK = N’C:Backuprtc.bak’ WITH NOFORMAT, INIT, NAME = N’rtc-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
—————END————–
BACKUP DATABASE [rtcconfig] TO DISK = N’C:Backuprtcconfig.bak’ WITH NOFORMAT, INIT, NAME = N’rtcconfig-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
—————END————–
BACKUP DATABASE [rtcdyn] TO DISK = N’C:Backuprtcdyn.bak’ WITH NOFORMAT, INIT, NAME = N’rtcdyn-Full Database Backup’, SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
—————END————–
I hope this helps, and if anything is unclear, please don’t hesitate to post comments below.
Great post! Thx!
But in your commands you have some syntax mistakes.