Question

Is it possible schedule a backup & restore of the WSS Site by using Timer Job? Or Does WSS 3.0 provides OOTB feature for the same?

Thanks, Tejas

Was it helpful?

Solution

The quick answer to your question, Tejas, is "yes, it is possible." My explanation assumes that you're asking for some programmatic leads on how to handle the process. If you're simply looking for a good way to schedule backup jobs (that is, your question is an admin question and not a programming question), then I'd agree with Alex and refer you to ServerFault.com; nine times out of ten times, Windows Task Scheduler is a good approach if you're going that direction.

First, a quick summary of your backup and restore options:

  1. If you're looking to perform a catastrophic farm backup or restore (i.e., the same type of backup and restore you'd perform through the Central Admin site), then you'll want to have a look at the Microsoft.SharePoint.Admininstration.Backup namespace. The specific point of entry is the SPBackupRestoreConsole type, and it is effectively the "director" for backup and restore operations. A host of supporting types (e.g., SPBackupRestoreObject, SPBackupSettings, and SPRestoreSettings) also come into play.

  2. If you're simply looking to backup and restore individual site collections, you'll want to look at the SPSiteCollection type in the Microsoft.SharePoint.Administration namespace. The SPSiteCollection has both a Backup method and a Restore method, and they do exactly what you'd expect. The nice thing about the SPSiteCollection approach is that the backup is a single file (versus the SPBackupRestoreConsole -- it creates all of the associated XML file history and multi-file backups of a standard catastrophic backup).

Though not strictly backup and restore, you have additional options in the content deployment API namespace (Microsoft.SharePoint.Deployment). Exports and imports are handled there.

These are the types you'd start with from within your timer job to carry out the desired backup and restore operations. If you included additional detail about what you were trying to do, I could provide additional suggestions.

I'm also assuming that you know how to programmatically create timer jobs. If you don't, the basics are covered in a really great article by Andrew Connell: http://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx. Building timer jobs is a topic unto itself, though :-)

I hope this helps!

OTHER TIPS

The only way to automate this is via STSADM backup commands. I found this SharePoint Site Backup Script by Michael Noel to be very helpful for exactly the same problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top