Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
Backing Up Flex Wiki Using X Copy
Shows a batch file using XCOPY to back up from a FlexWiki from a webserver onto a "backup server" (i.e. a NAS or similar.)

This is a process I set up to backup our internal FlexWiki and I thought I would share it with the community.

I set up an hour wiki backup process on our backup server (a computer with large hard disks that contain our first generation hourly backups.) I created a C:\Backup\FlexWiki\ directory and in it placed a batch file called HourlyFlexWikiBackup.bat. I then scheduled this batch file to be run hourly.

The batch file contains the following:

        REM HourlyFlexWikiBackup.bat
        REM PURPOSE:
        REM   * A batch file to be called hourly by the task scheduler from a 
        REM     "backup server" (i.e. a NAS or machine.)
        REM   * Creates a date/time stamped log of the last files backed up and 
        REM     also of all files every backed up.
        REM ASSUMES (i.e. these are what you'll need to change to use this:
        REM   * Your FlexWiki is located on a webserver named \\WEBSERVER
        REM   * Your FlexWiki can be read from a share named \\WEBSERVER\FlexWiki
        REM   * Your backup server stores the FlexWiki backup/mirror in a directory
        REM     named c:\Backup\FlexWiki\ 
        REM NOTES:
        REM   * Be sure to FIRST run this w/o the "/M" to back up all files. 
        REM     The "/M" is used to copy only newly changed files.
        REM HISTORY:
        REM   2005-Jan-07; created; MikeSchinkel (http://www.xtras.net)
        cd c:\Backup\FlexWiki\
        echo =[Begin FlexWiki Backup]======= > WikiFilesLastCopied.log
        date /T >> WikiFilesLastCopied.log
        time /T >> WikiFilesLastCopied.log 
        set COPYCMD= /M /D /E /C /G /K /O /X /Y /I /F
        xcopy \\WEBSERVER\FlexWiki\*.* *.* >> WikiFilesLastCopied.log
        echo =[End FlexWiki Backup]=========>> WikiFilesLastCopied.log
        type WikiFilesLastCopied.log >> WikiFilesCopied.log 

The XCOPY parameters I configured will only copy newer files, and only those that are not already in the backup directory. XCOPY is a primative tool, but I think works well for FlexWiki because FlexWiki does not lock files (at least that's what I think), and just renames the old file from .WIKI to .AWIKI and writes the changes to the .WIKI file. I don't think XCOPY would be a great solution for much else, but I think it is sufficient for first generation FlexWiki mirror/backup. It of course needs to then be backed up to tape or otherwise.

MikeSchinkel [2005-Jan-07]

Object reference not set to an instance of an object.