备份与备份 恢复计时器作业 WSS 3.0
是否可以安排备份和备份? 使用计时器作业恢复 WSS 站点? 或者 WSS 3.0 是否提供 OOTB 功能?
谢谢, 特哈斯
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
自动执行此操作的唯一方法是通过 STSADM 备份命令。 我发现 Michael Noel 的 SharePoint 站点备份脚本 对于完全相同的情况非常有帮助问题。
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.
Tejas,对你的问题的快速回答是“是的,这是可能的”。 我的解释假设您正在寻求一些有关如何处理该流程的程序化线索。 如果您只是在寻找一种安排备份作业的好方法(也就是说,您的问题是管理问题而不是编程问题),那么我会同意 Alex 的观点,并推荐您访问 ServerFault.com; 如果您朝这个方向发展,十有八九,Windows 任务计划程序是一个好方法。
首先,快速总结一下备份和还原选项:
如果您希望执行灾难性场备份或还原(即,与通过中央管理站点执行的备份和还原类型相同),那么您需要查看 Microsoft.SharePoint.Administration.Backup 命名空间。 具体的入口点是SPBackupRestoreConsole类型,它实际上是备份和恢复操作的“指挥者”。 许多支持类型(例如,SPBackupRestoreObject、SPBackupSettings 和 SPRestoreSettings)也会发挥作用。
如果您只是想备份和还原单个网站集,则需要查看SPSiteCollection Microsoft.SharePoint.Administration 命名空间中的类型。 SPSiteCollection 具有Backup 方法和Restore 方法,它们的作用完全符合您的预期。 SPSiteCollection 方法的优点是备份是单个文件(与 SPBackupRestoreConsole 相比)——它创建所有关联的 XML 文件历史记录和多文件备份标准灾难性备份)。
尽管不是严格意义上的备份和还原,但您在内容部署 API 命名空间中还有其他选项 (Microsoft.SharePoint.Deployment)。 出口和进口均在那里处理。
您可以从计时器作业中开始使用这些类型来执行所需的备份和恢复操作。 如果您提供了有关您尝试执行的操作的更多详细信息,我可以提供其他建议。
我还假设您知道如何以编程方式创建计时器作业。 如果您不这样做,Andrew Connell 的一篇非常棒的文章介绍了基础知识:http ://www.andrewconnell.com/blog/articles/CreatingCustomSharePointTimerJobs.aspx。 不过,构建计时器作业本身就是一个主题:-)
我希望这会有所帮助!
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:
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.
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!