|
BackUp |
|
|
After installing ChannelCRM you should set up procedures for preventing data loss. One of the ways to do this is to plan for frequent backups.
There are several ways to perform backups - in this topic you will see three:
1. Ad Hoc backup For this you can use the program CRM Manager. Inside the program (which you will run on the server itself) use the left hand navigator to open Backup and follow the guidance.
2. Scheduled backup SQL Server Express versions If you are using SQL Server in the Express editions, you are without the SQL Server component named SQL Agent. (SQL Agent is ideally suited for performing backup jobs). As another means of doing the backup we will write a small SQL script to call the backup and call this script from within Windows Scheduled Tasks.
Step 1: The script
The backup is called by the T-SQL command BACKUP DATABASE. Create a text file and insert two lines as follows:
BACKUP DATABASE CCRMDB TO DISK = 'D:\Documents and Settings\All Users\Documents\Backup\Data.bak' WITH FORMAT; GO
Please change the alias from CCRMDB if you are using another alias. The path to the destination files can also be changed, but please note that the account running SQL Server has to have write access to the destination folder. (That's why we have chosen a shared folder).
Save the script file and tahe a note of the location.
Step 2: SQLCMD
For running the script you will use SQLCMD. SQLCMD is a console program that is part of a SQL Server installation.
If the script file is saved as "C:\backup.txt" you will call SQLCMD with parameters:
sqlcmd -S.\SQLEXPRESS -dCCRMDB -iC:\backup.txt -oc:\backuplog.txt
.\SQLEXPRESS should be changed, if your data server is named differently from SQLEXPRESS. CCRMDB should be changed if you are using another alias. backuplog.txt may be changed.
This command could be called directly from the Windows Command Prompt (and should for testing purposes) but you can create a Windows Scheduled Task as well. Please note that this task has to run with privileges allowing for connecting to SQL Server and performing a backup.
3. Scheduled backup with SQL Server (non Express) In the "full" versions of SQL Server Management Studio you will find wizards for setting up a backup and for putting the job under SQL Agent control. This is quite easy and also you will have access to e-mail alerts etc. in case the job fails.
Page url: http://www.channelcrmhelp.com/index.html?net_backup.htm |