Backup OfficeClip Information

 

OfficeClip can be backed up by backing up its installation folder. There are two types of backup supported in OfficeClip:

  1. Full Backup
  2. Database incremental backup

 

1. Full Backup

Create a file called backup.cmd and put the following commands in it:

            net stop "SQL Server (OFFICECLIP7)"
            xcopy /E/C/F/R/O/Y "c:\program files\officeclip\7" d:\officeclipbackup
            net start "SQL Server (OFFICECLIP7)"
            
Note: If you have changed the location of the upload folder, you will need to back it up too. Also you may need to change some parameters here depending on your Sql Server instance, officeclip installation and backup folder.

To restore create another file called restore.cmd and put the following commands in it:
            net stop "SQL Server (OFFICECLIP7)"
            xcopy /E/C/F/R/O/Y d:\officeclipbackup "c:\program files\officeclip\7" 
            net start "SQL Server (OFFICECLIP7)"
            

2.Database incremental backup

The database incremental backup allows administrators to backup the transaction logs periodically instead of backing up the complete database at one time This has an advantage of losing only a small amount of data should the database crashes.

OfficeClip implements a mechanism of log shipping (available in sql enterprise servers), that can backup the transaction logs periodically in addition to taking full log once a day or so.

The command tool for this is available at: c:\program files\officeclip\7\ocbackup.exe

 

   Usage: ocbackup -c command -d databasename -f foldername -s connection-string [-bt backup-time] [-bd old-backups] [-l log-folder-path] [-lrem log-remove-days] 

        Everytime this program is run a full-backup or transaction log backup is taken or restored (see below for options). 

        This program must be scheduled to run at regular intervals using the Microsoft Scheduler.

        Note: OfficeClip database must be changed to Full Recovery mode (via Sql Management Studio) if transaction logs are to be created. 

        If the arguments have blank spaces please put them in double quotes ("")
        -d is the OfficeClip database name 
        -f is the folder name where the backup will be stored and restored from, do not put a trailing slash! 
        -s is the sql connection string, the connection string should have admin capabilities (preferably for the Master database) 
        -bt is the machine time when the full-backup is taken every day. It should be specified in hour (integer 0-23). 
                If -bt set to -1 then full-backup will be taken every time the program is run and no transaction log will be taken. 
                If -bt is not specified, full-backup will be done at 1:00AM machine time.
        -bd shows number of days the old backups needs to be preserved. If not specified, this value is fixed at 5 
        -l specified the folder where the log files are stored.
                If -l is not specified, log files will be created in the log folder one level below.
        -lrem specifies how many days of log is kept
                If -lrem is not specified, all log files older than 2 days will be removed.
         
         Commands: (with -c option) 
         backup: Backup the database and/or transaction logs. 
         restore: Restore the database and transaction logs. 
         Error Codes: 
         -1: Invalid number of arguments. 
         -2: Invalid command or command not supported. 
         -9: An unhandled exception occurred.         
 
Note that ocbackup should be run periodically. Typically you will run it using the windows task scheduler. For example, if you want to take a backup every 30 minutes, then run the following command:

        
        "c:\program files\officeclip\7\ocbackup.exe" -c backup -f d:\databasebackup -s 
        "server=(local)\OfficeClip7;uid=sa;pwd=mypassword;database=Master;Trusted_Connection=False" -d OfficeClip7
 

Transaction logs will be collected every time the command runs. A full backup is taken once a day and all previous transaction logs are removed.

 

When this command is run with the restore option (-c restore) on an empty database, the full backup and the transaction logs are restored in sequence.

 

Using the Windows Task Scheduler

The windows task scheduler can periodically backup information unattended. The following description will show how to use the task scheduler on a windows 2000 machine.

  1. Go to the Startup menu and select Scheduled Task application


  2. Double click on the Add Scheduled Task and the click Next on the wizard


  3. Browse for the command batch file that you just created.


  4. Select the interval and click on next. You will be able to fine-tune the interval by editing properties.


  5. Select the start time and date and click next


  6. Put the administrator login and password, so that the task can be run even when the user is logged off.


  7. Click on Finish to save the task.


  8. The task appears on the task list.


  9. To fine tune the task right click on the task name and click properties.




 Send us your feedback  Copyright© OfficeClip LLC 2000-2006, All Rights Reserved 

 OfficeClip provides a suite of web-based enterprise software such as Web Contact Manager, Issue and Bug Tracker, Time and Expense Reporting, Free Group Calendar, Free Document Sharing and other applications.